<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; virus definitions</title> <atom:link href="http://www.ghacks.net/tag/virus-definitions/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 17:32:23 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Add antivirus to Postfix with ClamAV</title><link>http://www.ghacks.net/2009/10/25/add-antivirus-to-postfix-with-clamav/</link> <comments>http://www.ghacks.net/2009/10/25/add-antivirus-to-postfix-with-clamav/#comments</comments> <pubDate>Sun, 25 Oct 2009 15:46:17 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Email]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[anti virus]]></category> <category><![CDATA[Postfix]]></category> <category><![CDATA[virus definitions]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=17707</guid> <description><![CDATA[By now you have your Postfix mail server up and running (see &#8220;Install Postfix for reliable email delievery&#8220;). You even have relaying working (see &#8220;Mail relaying made simple with Postfix&#8220;). But one of the most important features you can add to a mail server is an system to prevent viruses from being passed to users. [...]]]></description> <content:encoded><![CDATA[<p>By now you have your Postfix mail server up and running (see &#8220;<a
title="Install Postfix for reliable email delievery" href="http://www.ghacks.net/2009/10/24/install-postfix-for-reliable-email-delivery/" target="_blank">Install Postfix for reliable email delievery</a>&#8220;). You even have relaying working (see &#8220;<a
title="Mail relaying made simple with Postfix" href="http://www.ghacks.net/2009/09/23/mail-relaying-made-simple-with-postfix/" target="_blank">Mail relaying made simple with Postfix</a>&#8220;). But one of the most important features you can add to a mail server is an system to prevent viruses from being passed to users. Naturally, the Linux fan will say &#8220;But Linux isn&#8217;t affected by viruses!&#8221;. Although that may, for the most part, be true, this is a mail SERVER which could be serving up mail to Windows users. And Windows machines ARE effected by viruses. To that end, anti-virus measures are a necessity on a Linux email server.</p><p>One of the best anti-virus systems for a Postfix server is <a
title="ClamAV" href="http://www.clamav.net/" target="_blank">ClamAV</a>. This anti-virus tool kit is open sourced and can be used on all UNIX-like operating systems. It&#8217;s easy to install and effective. In this article we will be following our series started way back in the <a
title="Installing Ubuntu Server 9.04" href="http://www.ghacks.net/2009/09/03/installing-ubuntu-server-9-04/" target="_blank">Installing Ubuntu Server 9.04 article</a>. Of course we will be installing ClamAV on a Ubuntu server running LAMP and Postfix. With that in mind, let&#8217;s get busy!</p><p><span
id="more-17707"></span><strong>Installation</strong></p><p>The first thing to take care of is the installation of ClamAV. There are a number of tools you will need to install. Open up a terminal window and issue the command:</p><p><code>sudo apt-get install clamav clamav-freshclam clamsmtp</code></p><p>The above command should also pick up all of the necessary dependencies. The installation will also start the clamav daemon. You will restart that momentarily</p><p><strong>Configuration</strong></p><p>Once installed you have some configurations to take care of. There are three files you are going to have to edit:</p><ul><li><span
style="background-color: #ffffff"><strong>/etc/clamsmtpd.conf</strong></span></li><li><span
style="background-color: #ffffff"><strong>/etc/postfix/main.cf</strong></span></li><li><span
style="background-color: #ffffff"><strong>/etc/postfix/master.cf</strong></span></li></ul><p>The first file to configure is the <strong>clamsmtpd.conf </strong>file. The configuration in this file is simple. Look for the lines:</p><p><em>OutAddress: 10025</em></p><p><em><em>127.0.0.1:10026</em></em></p><p>Change them to:</p><p><em>OutAddress: 10026</em></p><p><em><em>127.0.0.1:10025</em></em></p><p>That&#8217;s it for the <strong>clamsmtpd.conf </strong>file. Now let&#8217;s move on to the heavier configurations.</p><p>Open up the <strong>/etc/postfix/main.cf </strong>file. Scroll down to the bottom of this file and add the following:</p><p><em>content_filter = scan:127.0.0.1:10025</em></p><p><em>receive_override_options = no_address_mappings</em></p><p>Save that file and now move on over to the <strong>/etc/postfix/master.cf</strong> file. Again, scroll down to the bottom of this file and add the following:</p><p><code># AV scan filter (used by content_filter)<br
/> scan      unix  -       -       n       -       16      smtp<br
/> -o smtp_send_xforward_command=yes<br
/> # For injecting mail back into postfix from the filter<br
/> 127.0.0.1:10026 inet  n -       n       -       16      smtpd<br
/> -o content_filter=<br
/> -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks<br
/> -o smtpd_helo_restrictions=<br
/> -o smtpd_client_restrictions=<br
/> -o smtpd_sender_restrictions=<br
/> -o smtpd_recipient_restrictions=permit_mynetworks,reject<br
/> -o mynetworks_style=host<br
/> -o smtpd_authorized_xforward_hosts=127.0.0.0/8</code></p><p>Save that file.</p><p><strong>Restarting</strong></p><p>The first thing you need to do is restart Postfix with the command:</p><p><em>sudo /etc/init.d/postfix restart</em></p><p>Once that has restarted you need to restart clamsmtpd with the command:</p><p><em>sudo /etc/init.d/clamsmtpd restart</em></p><p>Now, if nothing has gone horribly wrong, you should have a virus protected Postfix mail server.</p><p><strong>Updating signatures</strong></p><p>You should never go without updating your virus signatures. This is critical for keeping your mail server virus-free as new viruses are created or old viruses mutate. Fortunately ClamAV has its own tool for this. You will need to go back to that terminal window and issue the command:</p><p><em>sudo freshclam</em></p><p>Which will update the signatures.</p><p>You might even add the <em>freshclam</em> command into the root users crontab for regular signature updates.</p><p><strong>Final thoughts</strong></p><p>Your Postfix mail server is getting better and stronger each day. Adding anti-virus is a critical step in the grand scheme of Postfix things. In our next addition to the Postfix series, we will add Spamassassin for anti-spam measures.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/10/25/add-antivirus-to-postfix-with-clamav/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
