{"id":906,"date":"2014-10-28T21:45:25","date_gmt":"2014-10-28T21:45:25","guid":{"rendered":"https:\/\/www.hort.net\/techblog\/?p=150"},"modified":"2014-10-28T21:45:25","modified_gmt":"2014-10-28T21:45:25","slug":"fixing-mailclamav-to-work-with-clamav-0-98-4","status":"publish","type":"post","link":"https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/","title":{"rendered":"Fixing Mail::ClamAV to work with >= clamav-0.98.4"},"content":{"rendered":"<p>The latest version of clamav relies on OpenSSL, but libclamav doesn&#8217;t automatically intialize that connection.  This patch we threw together for Mail-ClamAV-0.29 fixes the problem by calling cl_initialize_crypto() first.  <\/p>\n<div class=\"horttech-code\"><pre class=\"preserve-code-formatting\">\n*** ClamAV.pm.orig&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2014-10-28 16:27:30.000000000 -0500\n--- ClamAV.pm&nbsp;&nbsp; 2014-10-28 16:26:48.000000000 -0500\n***************\n*** 205,210 ****\n--- 205,215 ----\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (stat(path, &amp;st) != 0)\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;croak(&quot;%s does not exist: %s\\n&quot;, path, strerror(errno));\n&nbsp;&nbsp;\n+&nbsp;&nbsp;&nbsp;&nbsp; if ((status = cl_initialize_crypto()) != CL_SUCCESS) { \n+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;error(status);\n+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return &amp;PL_sv_undef; \n+&nbsp;&nbsp;&nbsp;&nbsp; } \n+ \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ((status = cl_init(CL_INIT_DEFAULT)) != CL_SUCCESS) {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;error(status);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return &amp;PL_sv_undef;\n<\/pre><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The latest version of clamav relies on OpenSSL, but libclamav doesn&#8217;t automatically intialize that connection. This patch we threw together for Mail-ClamAV-0.29 fixes the problem by calling cl_initialize_crypto() first. *** ClamAV.pm.orig&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2014-10-28 16:27:30.000000000 -0500 &#8212; ClamAV.pm&nbsp;&nbsp; 2014-10-28 16:26:48.000000000 -0500 *************** *** 205,210 **** &#8212; 205,215 &#8212;- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (stat(path, &amp;st) != 0) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;croak(&quot;%s does not exist: %s\\n&quot;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[61,68,71],"class_list":["post-906","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-clamav","tag-mailclamav","tag-perl"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Fixing Mail::ClamAV to work with &gt;= clamav-0.98.4 - hort.net blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fixing Mail::ClamAV to work with &gt;= clamav-0.98.4 - hort.net blog\" \/>\n<meta property=\"og:description\" content=\"The latest version of clamav relies on OpenSSL, but libclamav doesn&#8217;t automatically intialize that connection. This patch we threw together for Mail-ClamAV-0.29 fixes the problem by calling cl_initialize_crypto() first. *** ClamAV.pm.orig&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2014-10-28 16:27:30.000000000 -0500 --- ClamAV.pm&nbsp;&nbsp; 2014-10-28 16:26:48.000000000 -0500 *************** *** 205,210 **** --- 205,215 ---- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (stat(path, &amp;st) != 0) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;croak(&quot;%s does not exist: %sn&quot;, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/\" \/>\n<meta property=\"og:site_name\" content=\"hort.net blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-10-28T21:45:25+00:00\" \/>\n<meta name=\"author\" content=\"Christopher Lindsey\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Christopher Lindsey\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/2014\\\/10\\\/28\\\/fixing-mailclamav-to-work-with-clamav-0-98-4\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/2014\\\/10\\\/28\\\/fixing-mailclamav-to-work-with-clamav-0-98-4\\\/\"},\"author\":{\"name\":\"Christopher Lindsey\",\"@id\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/#\\\/schema\\\/person\\\/c5048c118466b10e17155d29454e63de\"},\"headline\":\"Fixing Mail::ClamAV to work with >= clamav-0.98.4\",\"datePublished\":\"2014-10-28T21:45:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/2014\\\/10\\\/28\\\/fixing-mailclamav-to-work-with-clamav-0-98-4\\\/\"},\"wordCount\":39,\"commentCount\":0,\"keywords\":[\"ClamAV\",\"Mail::ClamAV\",\"Perl\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hort.net\\\/blog\\\/2014\\\/10\\\/28\\\/fixing-mailclamav-to-work-with-clamav-0-98-4\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/2014\\\/10\\\/28\\\/fixing-mailclamav-to-work-with-clamav-0-98-4\\\/\",\"url\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/2014\\\/10\\\/28\\\/fixing-mailclamav-to-work-with-clamav-0-98-4\\\/\",\"name\":\"Fixing Mail::ClamAV to work with >= clamav-0.98.4 - hort.net blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/#website\"},\"datePublished\":\"2014-10-28T21:45:25+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/#\\\/schema\\\/person\\\/c5048c118466b10e17155d29454e63de\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/2014\\\/10\\\/28\\\/fixing-mailclamav-to-work-with-clamav-0-98-4\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hort.net\\\/blog\\\/2014\\\/10\\\/28\\\/fixing-mailclamav-to-work-with-clamav-0-98-4\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/2014\\\/10\\\/28\\\/fixing-mailclamav-to-work-with-clamav-0-98-4\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fixing Mail::ClamAV to work with >= clamav-0.98.4\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/\",\"name\":\"hort.net blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/#\\\/schema\\\/person\\\/c5048c118466b10e17155d29454e63de\",\"name\":\"Christopher Lindsey\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/07\\\/Christopher-Lindsey_avatar_1437067426-96x96.jpg\",\"url\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/07\\\/Christopher-Lindsey_avatar_1437067426-96x96.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/07\\\/Christopher-Lindsey_avatar_1437067426-96x96.jpg\",\"caption\":\"Christopher Lindsey\"},\"url\":\"https:\\\/\\\/www.hort.net\\\/blog\\\/author\\\/chris\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fixing Mail::ClamAV to work with >= clamav-0.98.4 - hort.net blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/","og_locale":"en_US","og_type":"article","og_title":"Fixing Mail::ClamAV to work with >= clamav-0.98.4 - hort.net blog","og_description":"The latest version of clamav relies on OpenSSL, but libclamav doesn&#8217;t automatically intialize that connection. This patch we threw together for Mail-ClamAV-0.29 fixes the problem by calling cl_initialize_crypto() first. *** ClamAV.pm.orig&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2014-10-28 16:27:30.000000000 -0500 --- ClamAV.pm&nbsp;&nbsp; 2014-10-28 16:26:48.000000000 -0500 *************** *** 205,210 **** --- 205,215 ---- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (stat(path, &amp;st) != 0) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;croak(&quot;%s does not exist: %sn&quot;, [&hellip;]","og_url":"https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/","og_site_name":"hort.net blog","article_published_time":"2014-10-28T21:45:25+00:00","author":"Christopher Lindsey","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Christopher Lindsey"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/#article","isPartOf":{"@id":"https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/"},"author":{"name":"Christopher Lindsey","@id":"https:\/\/www.hort.net\/blog\/#\/schema\/person\/c5048c118466b10e17155d29454e63de"},"headline":"Fixing Mail::ClamAV to work with >= clamav-0.98.4","datePublished":"2014-10-28T21:45:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/"},"wordCount":39,"commentCount":0,"keywords":["ClamAV","Mail::ClamAV","Perl"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/","url":"https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/","name":"Fixing Mail::ClamAV to work with >= clamav-0.98.4 - hort.net blog","isPartOf":{"@id":"https:\/\/www.hort.net\/blog\/#website"},"datePublished":"2014-10-28T21:45:25+00:00","author":{"@id":"https:\/\/www.hort.net\/blog\/#\/schema\/person\/c5048c118466b10e17155d29454e63de"},"breadcrumb":{"@id":"https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hort.net\/blog\/2014\/10\/28\/fixing-mailclamav-to-work-with-clamav-0-98-4\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hort.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Fixing Mail::ClamAV to work with >= clamav-0.98.4"}]},{"@type":"WebSite","@id":"https:\/\/www.hort.net\/blog\/#website","url":"https:\/\/www.hort.net\/blog\/","name":"hort.net blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hort.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.hort.net\/blog\/#\/schema\/person\/c5048c118466b10e17155d29454e63de","name":"Christopher Lindsey","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hort.net\/blog\/wp-content\/uploads\/2015\/07\/Christopher-Lindsey_avatar_1437067426-96x96.jpg","url":"https:\/\/www.hort.net\/blog\/wp-content\/uploads\/2015\/07\/Christopher-Lindsey_avatar_1437067426-96x96.jpg","contentUrl":"https:\/\/www.hort.net\/blog\/wp-content\/uploads\/2015\/07\/Christopher-Lindsey_avatar_1437067426-96x96.jpg","caption":"Christopher Lindsey"},"url":"https:\/\/www.hort.net\/blog\/author\/chris\/"}]}},"_links":{"self":[{"href":"https:\/\/www.hort.net\/blog\/wp-json\/wp\/v2\/posts\/906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hort.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hort.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hort.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hort.net\/blog\/wp-json\/wp\/v2\/comments?post=906"}],"version-history":[{"count":0,"href":"https:\/\/www.hort.net\/blog\/wp-json\/wp\/v2\/posts\/906\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hort.net\/blog\/wp-json\/wp\/v2\/media?parent=906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hort.net\/blog\/wp-json\/wp\/v2\/categories?post=906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hort.net\/blog\/wp-json\/wp\/v2\/tags?post=906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}