{"id":45,"date":"2025-01-19T23:19:07","date_gmt":"2025-01-19T15:19:07","guid":{"rendered":"https:\/\/zhang.bo.de.com\/page\/?p=45"},"modified":"2025-01-19T23:19:07","modified_gmt":"2025-01-19T15:19:07","slug":"clamav-postfix-how-we-install-it","status":"publish","type":"post","link":"https:\/\/zhang.bo.de.com\/page\/2025\/01\/19\/45.html","title":{"rendered":"ClamAV Postfix \u2013 how we install it"},"content":{"rendered":"<p><em>Are you trying to install Antivirus ClamAV Postfix? We can help you.<\/em><\/p>\n<p>ClamAV is an anti-virus software that scans and detects any viruses.<\/p>\n<p>Here at Bobcares, we often receive requests to enable ClamAV and fix its errors as a part of our\u00a0<a href=\"https:\/\/bobcares.com\/server-management-services\/\">Server Management Services<\/a>.<\/p>\n<p>Today, let\u2019s see how our\u00a0<a href=\"https:\/\/bobcares.com\/server-management-services\/\">Support Engineers<\/a>\u00a0enable ClamAV and fix its errors.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>More about ClamAV Postfix<\/h2>\n<p>ClamAV is mainly designed to scan the files in the server. It detects viruses and any malicious contents from the emails and files in the server.<\/p>\n<p>It also scans the archive files, zip files and many more.<\/p>\n<p>ClamAV integrated with Postfix will scan all the emails on the server.<\/p>\n<p>Now, let\u2019s see how our\u00a0<a href=\"https:\/\/bobcares.com\/server-management-services\/\">Support Engineers<\/a>\u00a0install ClamAV.<\/p>\n<p>&nbsp;<\/p>\n<h2>How we install ClamAV Postfix<\/h2>\n<p>Here is the simple installation steps for ClamAV in Postfix in Ubuntu that our\u00a0<a href=\"https:\/\/bobcares.com\/server-management-services\/\">Support Engineers<\/a>\u00a0follow.<\/p>\n<p>1. Initially, we run the below command to download and install ClamAV.<\/p>\n<pre><code>apt-get install clamav clamsmtp clamav-freshclam<\/code><\/pre>\n<p>2. Next, we edit the configuration file\u00a0<em>\/etc\/clamsmtpd.conf<\/em>. Here, we update the below lines from<\/p>\n<pre><code>OutAddress: 10025\r\nListen: 1xx.x.x.1:10026<\/code><\/pre>\n<p>to<\/p>\n<pre><code>OutAddress: 10026\r\nListen: 1xx.x.x.1:10025<\/code><\/pre>\n<p>3. Then, we edit the postfix configuration file\u00a0<em>\/etc\/postfix\/main.cf<\/em>\u00a0and add the below contents<\/p>\n<pre><code>content_filter = scan:1xx.x.x.1:10025\r\nreceive_override_options = no_address_mappings<\/code><\/pre>\n<p>4. Also, we edit the\u00a0<em>\/etc\/postfix\/master.cf<\/em>\u00a0file and add the below contents<\/p>\n<pre><code># AV scan filter (used by content_filter)\r\nscan unix - - n - 16 smtp\r\n-o smtp_send_xforward_command=yes\r\n# For injecting mail back into postfix from the filter\r\n1xx.x.x.1:10026 inet n - n - 16 smtpd\r\n-o content_filter=\r\n-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks\r\n-o smtpd_helo_restrictions=\r\n-o smtpd_client_restrictions=\r\n-o smtpd_sender_restrictions=\r\n-o smtpd_recipient_restrictions=permit_mynetworks,reject\r\n-o mynetworks_style=host\r\n-o smtpd_authorized_xforward_hosts=1xx.x.x.0\/8<\/code><\/pre>\n<p>5. Lastly, we restart postfix, ClamAV-daemon, and clamsmtp.<\/p>\n<p>Finally, we have configured ClamAV.<\/p>\n<p>&nbsp;<\/p>\n<h2>How we fix ClamAV errors?<\/h2>\n<p>Having a decade of experience in managing servers, our\u00a0<a href=\"https:\/\/bobcares.com\/server-management-services\/\">Dedicated Engineers<\/a>\u00a0are familiar with the ClamAV errors. Now, let\u2019s discuss how our\u00a0<a href=\"https:\/\/bobcares.com\/server-management-services\/\">Support Engineers<\/a>\u00a0fix this error.<\/p>\n<p>Recently, one of our customers approached us with the below error message.<\/p>\n<p><img decoding=\"async\" id=\"MTYyMjoxOTY=-1\" class=\"alignnone wp-image-237004 size-full lazyloaded\" src=\"https:\/\/cdn-bhdil.nitrocdn.com\/isrDVIFCpCXbHHPoNruCoFKRiVumSNxS\/assets\/static\/optimized\/rev-e1c772e\/wp-content\/uploads\/clamavpostfix.png\" alt=\"ClamAV Postfix \" width=\"664\" height=\"55\" \/><\/p>\n<p>Our\u00a0<a href=\"https:\/\/bobcares.com\/server-management-services\/\">Support Engineers<\/a>\u00a0started troubleshooting the error and then tried upgrading the ClamAV package. And then restarted clamd and postfix service.<\/p>\n<p>Finally, this fixed the error.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>[Need any assistance in fixing ClamAV errors? \u2013\u00a0<a href=\"https:\/\/bobcares.com\/server-management-services\/\">We\u2019ll help you<\/a>]<\/strong><\/p>\n<p>&nbsp;<\/p>\n<h2>Conclusion<\/h2>\n<p>In short, the ClamAV is mainly used to secure email services. Today, we saw how our\u00a0<a href=\"https:\/\/bobcares.com\/server-management-services\/\">Support Engineers<\/a>\u00a0install ClamAV and fix its errors.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you trying to install Antivirus ClamAV Postfix? We can help you. ClamAV is an anti-virus software that scans and detects any viruses. Here at Bobc&hellip;<\/p>\n<p> <a class=\"more-link\" href=\"https:\/\/zhang.bo.de.com\/page\/2025\/01\/19\/45.html\">\u7ee7\u7eed\u9605\u8bfb<\/a><\/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":[],"class_list":{"0":"post-45","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-article"},"_links":{"self":[{"href":"https:\/\/zhang.bo.de.com\/page\/wp-json\/wp\/v2\/posts\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zhang.bo.de.com\/page\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zhang.bo.de.com\/page\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zhang.bo.de.com\/page\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zhang.bo.de.com\/page\/wp-json\/wp\/v2\/comments?post=45"}],"version-history":[{"count":1,"href":"https:\/\/zhang.bo.de.com\/page\/wp-json\/wp\/v2\/posts\/45\/revisions"}],"predecessor-version":[{"id":46,"href":"https:\/\/zhang.bo.de.com\/page\/wp-json\/wp\/v2\/posts\/45\/revisions\/46"}],"wp:attachment":[{"href":"https:\/\/zhang.bo.de.com\/page\/wp-json\/wp\/v2\/media?parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zhang.bo.de.com\/page\/wp-json\/wp\/v2\/categories?post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zhang.bo.de.com\/page\/wp-json\/wp\/v2\/tags?post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}