<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">
<channel>
    <title>freebsd.munk.me.uk - Email</title>
    <link>http://freebsd.munk.me.uk/</link>
    <description>FreeBSD System Administration</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.5.2 - http://www.s9y.org/</generator>
    
    <image>
        <url>http://freebsd.munk.me.uk/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: freebsd.munk.me.uk - Email - FreeBSD System Administration</title>
        <link>http://freebsd.munk.me.uk/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Installing Exim, SASLAuthd, ClamAV and SpamAssassin on FreeBSD 6.2</title>
    <link>http://freebsd.munk.me.uk/archives/212-Installing-Exim,-SASLAuthd,-ClamAV-and-SpamAssassin-on-FreeBSD-6.2.html</link>
            <category>Email</category>
            <category>Ports</category>
            <category>Security</category>
            <category>Spam</category>
    
    <comments>http://freebsd.munk.me.uk/archives/212-Installing-Exim,-SASLAuthd,-ClamAV-and-SpamAssassin-on-FreeBSD-6.2.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=212</wfw:comment>

    <slash:comments>13</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=212</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    &lt;strong&gt;Introduction&lt;/strong&gt;&lt;br /&gt;
This article describes the steps necessary to install and configure Exim on FreeBSD 6.2 with support for the following:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li/&gt;authenticated SMTP (asmtp) using SASLAuthd&lt;br /&gt;
&lt;li/&gt;spam detection and quarantine using SpamAssassin&lt;br /&gt;
&lt;li/&gt;malware detection and quarantine using ClamAV&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
Each of the required &#039;dependencies&#039; or components will be installed and configured, Exim will be installed and configured and finally we will test to check each component is working as required.&lt;br /&gt;
&lt;br /&gt;
With regards to spam and malware scanning, the system described will quarantine any files/messages that it finds classified as spam or malware.  In this way the quarantined files can be checked over by the admin at a later date and various stats gathering can be done if required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Installing and Configuring SASLAuthd&lt;/strong&gt;&lt;br /&gt;
SASLAuthd is an authentication daemon that can handle authentication requests from 3rd party applications such as Exim - generally for any application that can&#039;t directly access a system password database because of permission restrictions.  In this case running Exim MTA as &#039;root&#039; is a potential security risk, so exim runs as the &#039;mailnull&#039; user on FreeBSD.  Unfortunately this means Exim can&#039;t easily read the system password database to authenticate users who want to send mail via the server, which is where SASLAuthd comes in.  Any requests for authentication with Exim are passed on to the SASLAuthd daemon which will then verify whether the user credentials are valid - if so, the email is delivered, if not, it&#039;s rejected.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li/&gt;Install SASLAuthd from the FreeBSD ports tree:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@win&amp;#160;/root#&amp;#160;cd&amp;#160;/usr/ports/security/cyrus-sasl2-saslauthd/&lt;br /&gt;
root@win&amp;#160;/usr/ports/security/cyrus-sasl2-saslauthd#&amp;#160;make&amp;#160;install&lt;br /&gt;
...&lt;br /&gt;
root@win&amp;#160;/usr/ports/security/cyrus-sasl2-saslauthd#&amp;#160;rehash&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Configure SASLAuthd to run at boot.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/rc.conf to include the following:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;saslauthd_enable=&quot;YES&quot;&lt;br /&gt;
saslauthd_flags=&quot;-a&amp;#160;getpwent&quot;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note:&lt;/b&gt;&lt;br /&gt;
SASLAuthd will run using the &#039;getpwent&#039; authentication mechanism with the flag above.  This method uses the passwd file directly instead of using other means like kerberos or PAM.  If you require another method, check the manpage for saslauthd.&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Start the SASLAuthd daemon running:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@win&amp;#160;/usr/ports/security/cyrus-sasl2-saslauthd#&amp;#160;cd&amp;#160;/usr/local/etc/rc.d&lt;br /&gt;
root@win&amp;#160;/usr/local/etc/rc.d#&amp;#160;./saslauthd&amp;#160;start&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;(Optional) Test the SASLAuthd daemon:&lt;br /&gt;
&lt;br /&gt;
Substitute &#039;user&#039; and &#039;pass&#039; for the username and password of a user&lt;br /&gt;
account on your system:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@win&amp;#160;/usr/local/etc/rc.d#&amp;#160;testsaslauthd&amp;#160;-u&amp;#160;user&amp;#160;-p&amp;#160;pass&lt;br /&gt;
0&amp;#58;&amp;#160;OK&amp;#160;&quot;Success.&quot;&lt;/div&gt;&lt;br /&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Installing and Configuring SpamAssassin&lt;/strong&gt;&lt;br /&gt;
SpamAssassin (SA) is one solution to the problem of spam.  SA can run as a daemon (spamd) in the background and accept requests from an MTA such as Exim to check whether an email message should be classified as spam.&lt;br /&gt;
&lt;br /&gt;
Spamd looks at the message and checks for various factors that make the message more or less likely to be spam and assigns the message a score based on what it finds.  Spamd will then reply to the MTA, telling it the spam score that it gave that message.  The MTA can then decide - based on that score - whether to accept/reject the message - or in the case of this guide whether to instead quarantine the message.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li/&gt;Install SA from the FreeBSD ports.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note:&lt;/b&gt;&lt;br /&gt;
There are various installation options you can choose when installing SA which you should see when you first run &#039;make install&#039; in the SA port directory.  To see the options after already configuring them you can run &#039;make config&#039;.&lt;br /&gt;
&lt;br /&gt;
In turn, each of SA&#039;s dependencies may also have options you can configure at install time.&lt;br /&gt;
&lt;br /&gt;
To write this guide I&#039;m only using the single option &#039;AS_ROOT&#039; in the SA install configuation and for the other items  generally just choose the&lt;br /&gt;
defaults.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@win&amp;#160;/root#&amp;#160;cd&amp;#160;/usr/ports/mail/p5-Mail-SpamAssassin/&lt;br /&gt;
root@win&amp;#160;/usr/ports/mail/p5-Mail-SpamAssassin#&amp;#160;make&amp;#160;install&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Once complete, you should see:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;_&amp;#160;&amp;#160;_____&amp;#160;_____&amp;#160;_____&amp;#160;_&amp;#160;&amp;#160;&amp;#160;_&amp;#160;_____&amp;#160;___&amp;#160;___&amp;#160;&amp;#160;_&amp;#160;&amp;#160;&amp;#160;_&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/&amp;#160;\|_&amp;#160;&amp;#160;&amp;#160;_|_&amp;#160;&amp;#160;&amp;#160;_|&amp;#160;____|&amp;#160;\&amp;#160;|&amp;#160;|_&amp;#160;&amp;#160;&amp;#160;_|_&amp;#160;_/&amp;#160;_&amp;#160;\|&amp;#160;\&amp;#160;|&amp;#160;|&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/&amp;#160;_&amp;#160;\&amp;#160;|&amp;#160;|&amp;#160;&amp;#160;&amp;#160;|&amp;#160;|&amp;#160;|&amp;#160;&amp;#160;_|&amp;#160;|&amp;#160;&amp;#160;\|&amp;#160;|&amp;#160;|&amp;#160;|&amp;#160;&amp;#160;|&amp;#160;|&amp;#160;|&amp;#160;|&amp;#160;|&amp;#160;&amp;#160;\|&amp;#160;|&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/&amp;#160;___&amp;#160;\|&amp;#160;|&amp;#160;&amp;#160;&amp;#160;|&amp;#160;|&amp;#160;|&amp;#160;|___|&amp;#160;|\&amp;#160;&amp;#160;|&amp;#160;|&amp;#160;|&amp;#160;&amp;#160;|&amp;#160;|&amp;#160;|_|&amp;#160;|&amp;#160;|\&amp;#160;&amp;#160;|&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/_/&amp;#160;&amp;#160;&amp;#160;\_\_|&amp;#160;&amp;#160;&amp;#160;|_|&amp;#160;|_____|_|&amp;#160;\_|&amp;#160;|_|&amp;#160;|___\___/|_|&amp;#160;\_|&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;See&amp;#160;/usr/local/share/doc/p5-Mail-SpamAssassin/INSTALL,&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;and&amp;#160;/usr/local/share/doc/p5-Mail-SpamAssassin/UPGRADE,&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;or&amp;#160;http&amp;#58;//spamassassin.org/dist/INSTALL&amp;#160;and&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;http&amp;#58;//spamassassin.org/dist/UPGRADE&amp;#160;BEFORE&amp;#160;enabling&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;this&amp;#160;version&amp;#160;of&amp;#160;SpamAssassin&amp;#160;for&amp;#160;important&amp;#160;information&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;regarding&amp;#160;changes&amp;#160;in&amp;#160;this&amp;#160;version.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
It&#039;s a good idea to read the files listed in the banner above.  SA has a large number of options that can be configured; a good place to start configuring options on FreeBSD is in /usr/local/etc/mail/spamassassin/.&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Configure SA to run at boot.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/rc.conf to include the following:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;spamd_enable=&quot;YES&quot;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Start SA spamd.&lt;br /&gt;
&lt;br /&gt;
We can now go on to actually start spamd running as a daemon and verify spamd started ok:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@win&amp;#160;/root#&amp;#160;cd&amp;#160;/usr/local/etc/rc.d&lt;br /&gt;
root@win&amp;#160;/usr/local/etc/rc.d#&amp;#160;rehash&lt;br /&gt;
root@win&amp;#160;/usr/local/etc/rc.d#&amp;#160;./sa&lt;br /&gt;
sa-spamd&amp;#42;&amp;#160;&amp;#160;&amp;#160;saslauthd&amp;#42;&lt;br /&gt;
root@win&amp;#160;/usr/local/etc/rc.d#&amp;#160;./sa-spamd&amp;#160;start&lt;br /&gt;
Starting&amp;#160;spamd.&lt;br /&gt;
munk@win&amp;#160;/usr/local/etc/rc.d#&amp;#160;./sa-spamd&amp;#160;status&lt;br /&gt;
spamd&amp;#160;is&amp;#160;running&amp;#160;as&amp;#160;pid&amp;#160;754.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This tells us spamd is running ok in the background.&lt;br /&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Installing and Configuring ClamAV&lt;/strong&gt;&lt;br /&gt;
ClamAV is an anti-virus suite and includes a daemon clamd (runs in the background to check for requests to test for virii), another daemon freshclam (updates the virus definition database) and a couple of clients to run on the commandline if you need them for local virus scanning.&lt;br /&gt;
&lt;br /&gt;
Exim will send requests to the clamd server in much the same was as spamd does - if clamd classifies a message as containing a virus, Exim will reject delivery of the message and instaed quarantine it.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li/&gt;Install ClamAV from the FreeBSD ports tree:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@win&amp;#160;/root#&amp;#160;cd&amp;#160;/usr/ports/security/clamav&lt;br /&gt;
root@win&amp;#160;/usr/ports/security/clamav#&amp;#160;make&amp;#160;install&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Configure ClamAV to start at boot time.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/rc.conf to include:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;clamav_clamd_enable=&quot;YES&quot;&lt;br /&gt;
clamav_freshclam_enable=&quot;YES&quot;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Configure clamd.&lt;br /&gt;
&lt;br /&gt;
Edit /usr/local/etc/clamd.conf to include the following:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;LogFile&amp;#160;/var/log/clamav/clamd.log&lt;br /&gt;
PidFile&amp;#160;/var/run/clamav/clamd.pid&lt;br /&gt;
DatabaseDirectory&amp;#160;/var/db/clamav&lt;br /&gt;
LocalSocket&amp;#160;/var/run/clamav/clamd&lt;br /&gt;
FixStaleSocket&lt;br /&gt;
User&amp;#160;clamav&lt;br /&gt;
AllowSupplementaryGroups&lt;br /&gt;
ScanMail&lt;br /&gt;
ScanArchive&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Start clamd and freshclam.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@win&amp;#160;/root#&amp;#160;cd&amp;#160;/usr/local/etc/rc.d&lt;br /&gt;
root@win&amp;#160;/usr/local/etc/rc.d#&amp;#160;./clamav-clamd&amp;#160;start&lt;br /&gt;
Starting&amp;#160;clamav_clamd.&lt;br /&gt;
root@win&amp;#160;/usr/local/etc/rc.d#&amp;#160;./clamav-freshclam&amp;#160;start&lt;br /&gt;
Starting&amp;#160;clamav_freshclam.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Note:&lt;/strong&gt;&lt;br /&gt;
You may see the following message on first running clamd:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;LibClamAV&amp;#160;Warning&amp;#58;&amp;#160;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;
LibClamAV&amp;#160;Warning&amp;#58;&amp;#160;&amp;#42;&amp;#42;&amp;#42;&amp;#160;&amp;#160;The&amp;#160;virus&amp;#160;database&amp;#160;is&amp;#160;older&amp;#160;than&amp;#160;7&amp;#160;days.&amp;#160;&amp;#160;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;
LibClamAV&amp;#160;Warning&amp;#58;&amp;#160;&amp;#42;&amp;#42;&amp;#42;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Please&amp;#160;update&amp;#160;it&amp;#160;IMMEDIATELY!&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;
LibClamAV&amp;#160;Warning&amp;#58;&amp;#160;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
As long as you&#039;re running freshclam, you can safely ignore this message.  Freshclam should update your definitions automatically.  Be sure to configure freshclam to update the virus definitions regularly.&lt;br /&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
ClamAV should be configured now and ready to accept request to check for malware from the Exim MTA.&lt;br /&gt;
&lt;br /&gt;
We can now move on finally to install and configure Exim.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Installing and Configuring Exim&lt;/strong&gt;&lt;br /&gt;
Exim configuration can be very complicated.  This guide will only deal with the configuration of Exim so it accepts mail on a domain &#039;mail.example.com&#039;, scans the mail for malware/spam  - quarantining anything it finds as malware/spam and accepts authentication requests correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Important:&lt;/strong&gt;&lt;br /&gt;
Ensure your mail server&#039;s DNS is configured correctly and preferably has a reverse DNS record (rDNS) set up.  Many mail servers will not deliver mail correctly to/from your mail server without rDNS.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li/&gt;Install Exim from the FreeBSD ports tree:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;&amp;#91;12&amp;#58;10&amp;#58;57&amp;#93;&amp;#160;root@win&amp;#160;/root#&amp;#160;cd&amp;#160;/usr/ports/mail/exim&lt;br /&gt;
&amp;#91;12&amp;#58;12&amp;#58;30&amp;#93;&amp;#160;root@win&amp;#160;/usr/ports/mail/exim#&amp;#160;&amp;#160;make&amp;#160;-DWITH_CONTENT_SCAN&amp;#160;-DWITH_SASLAUTHD&amp;#160;install&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Stop the Sendmail daemon if it&#039;s already running:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@win&amp;#160;/root#&amp;#160;cd&amp;#160;/etc/rc.d&lt;br /&gt;
root@win&amp;#160;/etc/rc.d#&amp;#160;./sendmail&amp;#160;stop&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Configure Exim to run at boot time.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/rc.conf to include:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;sendmail_enable=&quot;NO&quot;&lt;br /&gt;
sendmail_submit_enable=&quot;NO&quot;&lt;br /&gt;
sendmail_outbound_enable=&quot;NO&quot;&lt;br /&gt;
sendmail_msp_queue_enable=&quot;NO&quot;&lt;br /&gt;
exim_enable=&quot;YES&quot;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This has the effect of disabling sendmail at boot time - the default FreeBSD MTA - and running Exim instead.&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Configure mailer.conf to use Exim as the default MTA.&lt;br /&gt;
&lt;br /&gt;
Edit /etc/mail/mailer.conf to read:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;sendmail&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/usr/local/sbin/exim&lt;br /&gt;
send-mail&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/usr/local/sbin/exim&lt;br /&gt;
mailq&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/usr/local/sbin/exim&amp;#160;-bp&lt;br /&gt;
newaliases&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;/usr/bin/true&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This will allow any FreeBSD base system mail related commands to use Exim instead of Sendmail.&lt;br /&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Configuring Exim&lt;/strong&gt;&lt;br /&gt;
We now move on to configuring Exim.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Set the primary hostname.&lt;br /&gt;
&lt;br /&gt;
Edit /usr/local/etc/exim/configure.&lt;br /&gt;
&lt;br /&gt;
Find and edit the &#039;primary_hostname&#039; line for your domain:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;primary_hostname&amp;#160;=&amp;#160;example.com&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This configures Exim to accept mail primarily for the &#039;example.com&#039; domain - ie foobar@example.com.&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Find and edit the following lines to read:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;av_scanner&amp;#160;=&amp;#160;clamd&amp;#58;/var/run/clamav/clamd&lt;br /&gt;
spamd_address&amp;#160;=&amp;#160;127.0.0.1&amp;#160;783&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Configure the malware and spam Access Control Lists (ACLs).&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;How malware/spam checking works in this system:&lt;/strong&gt;&lt;br /&gt;
We add a check in the acl_check_data ACL for spam and malware.  Exim will request each email is checked for spam/malware by the relevant daemon - spamd for spam, clamd for malware.  If the message is classified as spam/malware by the relevant daemons, Exim will add a header to the message &#039;X-Quarantine-Me-Spam&#039; (similar for malware).&lt;br /&gt;
&lt;br /&gt;
Later on when it comes to actually delivering (termed &#039;routing&#039; in Exim terminology), we add two routers to test for the existence of the headers that are added in the acl_check_data ACL if a message is found to be spam/malware.  If the headers are found by the malware/spam routers, the message is not delivered but instead copied to a quarantine location on disk.&lt;br /&gt;
&lt;br /&gt;
This quarantine location can then be checked later by an admin to check if anything is amiss - ie regular non spam/malware mail that should really have been delivered.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;re satisfied the configuration is working as it should - ie after a few months of operation - and not finding false positives, you can change the malware/spam acl checks to just deny instead of adding the quarantine headers.  Having said that, I still opt to just quarantine malware/spam and remove it at a later date.&lt;br /&gt;
&lt;br /&gt;
On to configuring the data ACL:&lt;br /&gt;
&lt;br /&gt;
Modify the acl_check_data ACL to read/include:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;acl_check_data&amp;#58;&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;#&amp;#160;Deny&amp;#160;if&amp;#160;the&amp;#160;message&amp;#160;contains&amp;#160;a&amp;#160;virus.&amp;#160;Before&amp;#160;enabling&amp;#160;this&amp;#160;check,&amp;#160;you&lt;br /&gt;
&amp;#160;&amp;#160;#&amp;#160;must&amp;#160;install&amp;#160;a&amp;#160;virus&amp;#160;scanner&amp;#160;and&amp;#160;set&amp;#160;the&amp;#160;av_scanner&amp;#160;option&amp;#160;above.&lt;br /&gt;
&amp;#160;&amp;#160;#&lt;br /&gt;
&amp;#160;&amp;#160;#&amp;#160;defer_ok&amp;#160;-&amp;#160;pass&amp;#160;this&amp;#160;message&amp;#160;if&amp;#160;scanner&amp;#160;is&amp;#160;down&amp;#160;etc&amp;#58;&lt;br /&gt;
&amp;#160;&amp;#160;warn&amp;#160;&amp;#160;message&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;X-Quarantine-Me-Malware&amp;#58;&amp;#160;$malware_name&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;log_message&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;malware&amp;#58;&amp;#160;$malware_name&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;demime&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;&amp;#42;&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;malware&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;&amp;#42;/defer_ok&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;#&amp;#160;Add&amp;#160;headers&amp;#160;to&amp;#160;a&amp;#160;message&amp;#160;if&amp;#160;it&amp;#160;is&amp;#160;judged&amp;#160;to&amp;#160;be&amp;#160;spam.&amp;#160;Before&amp;#160;enabling&amp;#160;this,&lt;br /&gt;
&amp;#160;&amp;#160;#&amp;#160;you&amp;#160;must&amp;#160;install&amp;#160;SpamAssassin.&amp;#160;You&amp;#160;may&amp;#160;also&amp;#160;need&amp;#160;to&amp;#160;set&amp;#160;the&amp;#160;spamd_address&lt;br /&gt;
&amp;#160;&amp;#160;#&amp;#160;option&amp;#160;above.&lt;br /&gt;
&amp;#160;&amp;#160;#&lt;br /&gt;
&amp;#160;&amp;#160;warn&amp;#160;&amp;#160;&amp;#160;&amp;#160;message&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;X-Quarantine-Me-Spam&amp;#58;&amp;#160;SA&amp;#160;score&amp;#160;$spam_score\n\&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;X-SA-Report&amp;#58;&amp;#160;$spam_report&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;log_message&amp;#160;&amp;#160;&amp;#160;=&amp;#160;Spam&amp;#160;score&amp;#160;$spam_score&amp;#160;&amp;#62;&amp;#160;5&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;spam&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;spamd/defer_ok&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;condition&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;${if&amp;#160;&amp;#62;{$spam_score_int}{50}{1}{0}}&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;#&amp;#160;Accept&amp;#160;the&amp;#160;message.&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;accept&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;At the top of the routers section&lt;/strong&gt;, modify to read/include:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;begin&amp;#160;routers&lt;br /&gt;
&lt;br /&gt;
check_malware&amp;#58;&lt;br /&gt;
&amp;#160;&amp;#160;driver&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;redirect&lt;br /&gt;
&amp;#160;&amp;#160;condition&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;${if&amp;#160;def&amp;#58;h_X-Quarantine-Me-Malware&amp;#58;&amp;#160;{1}{0}}&lt;br /&gt;
&amp;#160;&amp;#160;headers_add&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;X-Quarantined-Malware&amp;#58;&amp;#160;$h_X-Quarantine-Me-Malware&amp;#58;&lt;br /&gt;
&amp;#160;&amp;#160;headers_remove&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;X-Quarantine-Me-Malware&lt;br /&gt;
&amp;#160;&amp;#160;data&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;/var/quarantine/malware/malware.$tod_logfile&lt;br /&gt;
&amp;#160;&amp;#160;file_transport&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;address_file&lt;br /&gt;
&lt;br /&gt;
check_spam&amp;#58;&lt;br /&gt;
&amp;#160;&amp;#160;driver&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;redirect&lt;br /&gt;
&amp;#160;&amp;#160;condition&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;${if&amp;#160;def&amp;#58;h_X-Quarantine-Me-Spam&amp;#58;&amp;#160;{1}{0}}&lt;br /&gt;
&amp;#160;&amp;#160;headers_add&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;X-Quarantined-Spam&amp;#58;&amp;#160;$h_X-Quarantine-Me-Spam&amp;#58;&lt;br /&gt;
&amp;#160;&amp;#160;headers_remove&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;X-Quarantine-Me-Spam&lt;br /&gt;
&amp;#160;&amp;#160;data&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;/var/quarantine/spam/spam.$tod_logfile&lt;br /&gt;
&amp;#160;&amp;#160;file_transport&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;=&amp;#160;address_file&lt;br /&gt;
&lt;br /&gt;
	no_more&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Modify the authenticators section to read:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;begin&amp;#160;authenticators&lt;br /&gt;
plain&amp;#58;&lt;br /&gt;
	driver&amp;#160;=&amp;#160;plaintext&lt;br /&gt;
	public_name&amp;#160;=&amp;#160;PLAIN&lt;br /&gt;
	server_condition&amp;#160;=&amp;#160;${if&amp;#160;saslauthd{{$2}{$3}}{1}{0}}&lt;br /&gt;
&lt;br /&gt;
login&amp;#58;&lt;br /&gt;
	driver&amp;#160;=&amp;#160;plaintext&lt;br /&gt;
	public_name&amp;#160;=&amp;#160;LOGIN&lt;br /&gt;
	server_prompts&amp;#160;=&amp;#160;&quot;Username&amp;#58;&amp;#58;&amp;#160;&amp;#58;&amp;#160;Password&amp;#58;&amp;#58;&quot;&lt;br /&gt;
	server_condition&amp;#160;=&amp;#160;${if&amp;#160;saslauthd{{$1}{$2}}{1}{0}}&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Save the /usr/local/etc/exim/configuration file.&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Create the quarantine directories and change ownership to mailnull:mail:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@win&amp;#160;/root#&amp;#160;mkdir&amp;#160;-p&amp;#160;/var/quarantine/{malware,spam}&lt;br /&gt;
root@win&amp;#160;/root#&amp;#160;chown&amp;#160;mailnull&amp;#58;mail&amp;#160;/var/quarantine/{malware,spam}&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Restart Exim to suck in the new config options:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@win&amp;#160;/root#&amp;#160;/usr/local/etc/rc.d/exim&amp;#160;restart&lt;br /&gt;
Stopping&amp;#160;exim.&lt;br /&gt;
Starting&amp;#160;exim.&lt;/div&gt;&lt;br /&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
Exim should now be set to check for malware/spam and to authenticate users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Testing Exim configuration&lt;/strong&gt;&lt;br /&gt;
Finally we can move on to test that our config works correctly for spam/malware checking and for authenticating users.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li/&gt;Testing Exim&#039;s malware/spam scanning.&lt;br /&gt;
&lt;br /&gt;
The easiest option is to send an email to your mailserver with specially crafted malware/spam signatures included in the body of the message.  When spamd/clamd see these signature strings in the body of the messages, they should classify the message as spam/malware and Exim in turn will quarantine the messages.&lt;br /&gt;
&lt;br /&gt;
The official EICAR malware/virus testing signature is as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;X5O%@AP&amp;#91;4\PZX54&amp;#40;P^&amp;#41;7CC&amp;#41;7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILEspamcH+H&amp;#42;&lt;/div&gt;&lt;br /&gt;
See here for the official string:&lt;br /&gt;
&lt;a href=&quot;http://www.eicar.org/anti_virus_test_file.htm&quot;  title=&quot;http://www.eicar.org/anti_virus_test_file.htm&quot;&gt;&lt;br /&gt;
http://www.eicar.org/anti_virus_test_file.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The official GTUBE spam testing signature is as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;XJS&amp;#42;C4JDBQADN1.NSBN3&amp;#42;2IDNEN&amp;#42;GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL&amp;#42;C.34X&lt;/div&gt;&lt;br /&gt;
See here for the official string:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://spamassassin.apache.org/gtube/&quot;  title=&quot;http://spamassassin.apache.org/gtube/&quot;&gt;http://spamassassin.apache.org/gtube/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Note:&lt;/strong&gt;&lt;br /&gt;
Another option for testing spam/malware scanning is to run exim from the commandline using the command &#039;exim -bh 127.0.0.1&#039;.  This will run an SMTP session from the commandline (think telnet) and allow you to inject your own specially crafted message using the signatures above.  This requires you enter a valid SMTP session, something like:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;HELO&amp;#160;example.com&lt;br /&gt;
MAIL&amp;#160;FROM&amp;#58;foo@example.com&lt;br /&gt;
RCPT&amp;#160;TO&amp;#58;foo@example.com&lt;br /&gt;
DATA&lt;br /&gt;
X5O%@AP&amp;#91;4\PZX54&amp;#40;P^&amp;#41;7CC&amp;#41;7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILEspamcH+H&amp;#42;&lt;br /&gt;
.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This would simulate the injection of a mail message with a virus in it and in &#039;exim -bh&#039; mode you can see a lot of useful debugging info to verify everything works ok.&lt;br /&gt;
&lt;br /&gt;
&lt;li/&gt;Testing Exim&#039;s Authentication configuration.&lt;br /&gt;
&lt;br /&gt;
We can now test that ASMTP is working.  For this you can either run exim in one of it&#039;s many excellent debugging modes or you can simply configure a remote email client to use ASMTP.  This guide will use the commandline to test ASMTP.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Important:&lt;/strong&gt;&lt;br /&gt;
Before attempting this method please read &lt;a href=&quot;http://www.exim.org/exim-html-4.10/doc/html/spec_32.html#IX1630&quot; target=&quot;_blank&quot;&gt;the exim documentation on how ASMTP works&lt;/a&gt;.  The following assumes you have read and understood that text.&lt;br /&gt;
&lt;br /&gt;
First create a simple perl script called &#039;encode&#039; in /usr/local/etc/exim/ and make sure it is executable:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@win&amp;#160;/usr/local/etc/exim#&amp;#160;cat&amp;#160;encode&lt;br /&gt;
#!/usr/bin/perl&lt;br /&gt;
use&amp;#160;MIME&amp;#58;&amp;#58;Base64;&lt;br /&gt;
printf&amp;#160;&amp;#40;&quot;%s&quot;,&amp;#160;encode_base64&amp;#40;eval&amp;#160;&quot;&quot;$ARGV&amp;#91;0&amp;#93;&quot;&quot;&amp;#41;&amp;#41;;&lt;br /&gt;
root@darkstar&amp;#160;/usr/local/etc/exim#&amp;#160;chmod&amp;#160;+x&amp;#160;encode&lt;br /&gt;
root@darkstar&amp;#160;/usr/local/etc/exim#&amp;#160;ls&amp;#160;-al&amp;#160;encode&lt;br /&gt;
-rwxr-xr-x&amp;#160;&amp;#160;1&amp;#160;root&amp;#160;&amp;#160;wheel&amp;#160;&amp;#160;85&amp;#160;Apr&amp;#160;23&amp;#160;12&amp;#58;25&amp;#160;encode&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Now decide which user account on your server you wish to test ASMTP with.  It must be an account you know the password for obviously.  I created an account called &#039;dummy&#039; and set the password to &#039;dummy&#039; as well - if you do this remember to remove the account or disable it as soon as you&#039;ve finished testing.&lt;br /&gt;
&lt;br /&gt;
Encode the user:password pair into base64 MIME using the &#039;encode&#039; script we created above:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@darkstar&amp;#160;/usr/local/etc/exim#&amp;#160;./encode&amp;#160;&quot;\0dummy\0dummy&quot;&lt;br /&gt;
AGR1bW15AGR1bW15&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Now enter into Exim&#039;s fake SMTP session command-line mode and just for good measure do it in authentication debug mode as well:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;root@win&amp;#160;/root#&amp;#160;&amp;#160;exim&amp;#160;-d+auth&amp;#160;-bh&amp;#160;127.0.0.1&lt;br /&gt;
Exim&amp;#160;version&amp;#160;4.66&amp;#160;&amp;#40;FreeBSD&amp;#160;6.1&amp;#41;&amp;#160;uid=0&amp;#160;gid=0&amp;#160;pid=3056&amp;#160;D=fbb95cfd&lt;br /&gt;
Probably&amp;#160;Berkeley&amp;#160;DB&amp;#160;version&amp;#160;1.8x&amp;#160;&amp;#40;native&amp;#160;mode&amp;#41;&lt;br /&gt;
Support&amp;#160;for&amp;#58;&amp;#160;crypteq&amp;#160;iconv&amp;#40;&amp;#41;&amp;#160;IPv6&amp;#160;use_setclassresources&amp;#160;PAM&amp;#160;Perl&amp;#160;OpenSSL&amp;#160;Content_Scanning&amp;#160;Old_Demime&lt;br /&gt;
Lookups&amp;#58;&amp;#160;lsearch&amp;#160;wildlsearch&amp;#160;nwildlsearch&amp;#160;iplsearch&amp;#160;cdb&amp;#160;dbm&amp;#160;dbmnz&amp;#160;dnsdb&amp;#160;dsearch&amp;#160;nis&amp;#160;nis0&amp;#160;passwd&lt;br /&gt;
Authenticators&amp;#58;&amp;#160;cram_md5&amp;#160;plaintext&amp;#160;spa&lt;br /&gt;
Routers&amp;#58;&amp;#160;accept&amp;#160;dnslookup&amp;#160;ipliteral&amp;#160;manualroute&amp;#160;queryprogram&amp;#160;redirect&lt;br /&gt;
Transports&amp;#58;&amp;#160;appendfile/maildir/mailstore/mbx&amp;#160;autoreply&amp;#160;lmtp&amp;#160;pipe&amp;#160;smtp&lt;br /&gt;
Fixed&amp;#160;never_users&amp;#58;&amp;#160;0&lt;br /&gt;
Size&amp;#160;of&amp;#160;off_t&amp;#58;&amp;#160;8&lt;br /&gt;
changed&amp;#160;uid/gid&amp;#58;&amp;#160;forcing&amp;#160;real&amp;#160;=&amp;#160;effective&lt;br /&gt;
&amp;#160;&amp;#160;uid=0&amp;#160;gid=0&amp;#160;pid=3056&lt;br /&gt;
&amp;#160;&amp;#160;auxiliary&amp;#160;group&amp;#160;list&amp;#58;&amp;#160;0&lt;br /&gt;
seeking&amp;#160;password&amp;#160;data&amp;#160;for&amp;#160;user&amp;#160;&quot;mailnull&quot;&amp;#58;&amp;#160;using&amp;#160;cached&amp;#160;result&lt;br /&gt;
getpwnam&amp;#40;&amp;#41;&amp;#160;succeeded&amp;#160;uid=26&amp;#160;gid=26&lt;br /&gt;
seeking&amp;#160;password&amp;#160;data&amp;#160;for&amp;#160;user&amp;#160;&quot;root&quot;&amp;#58;&amp;#160;cache&amp;#160;not&amp;#160;available&lt;br /&gt;
getpwnam&amp;#40;&amp;#41;&amp;#160;succeeded&amp;#160;uid=0&amp;#160;gid=0&lt;br /&gt;
configuration&amp;#160;file&amp;#160;is&amp;#160;/usr/local/etc/exim/configure&lt;br /&gt;
log&amp;#160;selectors&amp;#160;=&amp;#160;00000ffc&amp;#160;00089001&lt;br /&gt;
trusted&amp;#160;user&lt;br /&gt;
admin&amp;#160;user&lt;br /&gt;
changed&amp;#160;uid/gid&amp;#58;&amp;#160;privilege&amp;#160;not&amp;#160;needed&lt;br /&gt;
&amp;#160;&amp;#160;uid=26&amp;#160;gid=6&amp;#160;pid=3056&lt;br /&gt;
&amp;#160;&amp;#160;auxiliary&amp;#160;group&amp;#160;list&amp;#58;&amp;#160;6&amp;#160;6&lt;br /&gt;
seeking&amp;#160;password&amp;#160;data&amp;#160;for&amp;#160;user&amp;#160;&quot;mailnull&quot;&amp;#58;&amp;#160;cache&amp;#160;not&amp;#160;available&lt;br /&gt;
getpwnam&amp;#40;&amp;#41;&amp;#160;succeeded&amp;#160;uid=26&amp;#160;gid=26&lt;br /&gt;
originator&amp;#58;&amp;#160;uid=0&amp;#160;gid=0&amp;#160;login=root&amp;#160;name=Charlie&amp;#160;Root&lt;br /&gt;
sender&amp;#160;address&amp;#160;=&amp;#160;root@win.munk.me.uk&lt;br /&gt;
sender_fullhost&amp;#160;=&amp;#160;&amp;#91;127.0.0.1&amp;#93;&lt;br /&gt;
sender_rcvhost&amp;#160;=&amp;#160;&amp;#91;127.0.0.1&amp;#93;&lt;br /&gt;
&lt;br /&gt;
&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#160;SMTP&amp;#160;testing&amp;#160;session&amp;#160;as&amp;#160;if&amp;#160;from&amp;#160;host&amp;#160;127.0.0.1&lt;br /&gt;
&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#160;but&amp;#160;without&amp;#160;any&amp;#160;ident&amp;#160;&amp;#40;RFC&amp;#160;1413&amp;#41;&amp;#160;callback.&lt;br /&gt;
&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#160;This&amp;#160;is&amp;#160;not&amp;#160;for&amp;#160;real!&lt;br /&gt;
&lt;br /&gt;
host&amp;#160;in&amp;#160;hosts_connection_nolog?&amp;#160;no&amp;#160;&amp;#40;option&amp;#160;unset&amp;#41;&lt;br /&gt;
LOG&amp;#58;&amp;#160;smtp_connection&amp;#160;MAIN&lt;br /&gt;
&amp;#160;&amp;#160;SMTP&amp;#160;connection&amp;#160;from&amp;#160;&amp;#91;127.0.0.1&amp;#93;&lt;br /&gt;
host&amp;#160;in&amp;#160;host_lookup?&amp;#160;yes&amp;#160;&amp;#40;matched&amp;#160;&quot;&amp;#42;&quot;&amp;#41;&lt;br /&gt;
looking&amp;#160;up&amp;#160;host&amp;#160;name&amp;#160;for&amp;#160;127.0.0.1&lt;br /&gt;
DNS&amp;#160;lookup&amp;#160;of&amp;#160;1.0.0.127.in-addr.arpa&amp;#160;&amp;#40;PTR&amp;#41;&amp;#160;succeeded&lt;br /&gt;
IP&amp;#160;address&amp;#160;lookup&amp;#160;yielded&amp;#160;localhost.munk.me.uk&lt;br /&gt;
gethostbyname2&amp;#160;looked&amp;#160;up&amp;#160;these&amp;#160;IP&amp;#160;addresses&amp;#58;&lt;br /&gt;
&amp;#160;&amp;#160;name=localhost.munk.me.uk&amp;#160;address=&amp;#58;&amp;#58;1&lt;br /&gt;
&amp;#160;&amp;#160;name=localhost.munk.me.uk&amp;#160;address=127.0.0.1&lt;br /&gt;
checking&amp;#160;addresses&amp;#160;for&amp;#160;localhost.munk.me.uk&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#58;&amp;#58;1&lt;br /&gt;
&amp;#160;&amp;#160;127.0.0.1&amp;#160;OK&lt;br /&gt;
sender_fullhost&amp;#160;=&amp;#160;localhost.munk.me.uk&amp;#160;&amp;#91;127.0.0.1&amp;#93;&lt;br /&gt;
sender_rcvhost&amp;#160;=&amp;#160;localhost.munk.me.uk&amp;#160;&amp;#40;&amp;#91;127.0.0.1&amp;#93;&amp;#41;&lt;br /&gt;
set_process_info&amp;#58;&amp;#160;&amp;#160;3056&amp;#160;handling&amp;#160;incoming&amp;#160;connection&amp;#160;from&amp;#160;localhost.munk.me.uk&amp;#160;&amp;#91;127.0.0.1&amp;#93;&lt;br /&gt;
host&amp;#160;in&amp;#160;host_reject_connection?&amp;#160;no&amp;#160;&amp;#40;option&amp;#160;unset&amp;#41;&lt;br /&gt;
host&amp;#160;in&amp;#160;sender_unqualified_hosts?&amp;#160;no&amp;#160;&amp;#40;option&amp;#160;unset&amp;#41;&lt;br /&gt;
host&amp;#160;in&amp;#160;recipient_unqualified_hosts?&amp;#160;no&amp;#160;&amp;#40;option&amp;#160;unset&amp;#41;&lt;br /&gt;
host&amp;#160;in&amp;#160;helo_verify_hosts?&amp;#160;no&amp;#160;&amp;#40;option&amp;#160;unset&amp;#41;&lt;br /&gt;
host&amp;#160;in&amp;#160;helo_try_verify_hosts?&amp;#160;no&amp;#160;&amp;#40;option&amp;#160;unset&amp;#41;&lt;br /&gt;
host&amp;#160;in&amp;#160;helo_accept_junk_hosts?&amp;#160;no&amp;#160;&amp;#40;option&amp;#160;unset&amp;#41;&lt;br /&gt;
SMTP&amp;#62;&amp;#62;&amp;#160;220&amp;#160;win.munk.me.uk&amp;#160;ESMTP&amp;#160;Exim&amp;#160;4.66&amp;#160;Wed,&amp;#160;17&amp;#160;Jan&amp;#160;2007&amp;#160;19&amp;#58;24&amp;#58;22&amp;#160;+0000&lt;br /&gt;
220&amp;#160;win.munk.me.uk&amp;#160;ESMTP&amp;#160;Exim&amp;#160;4.66&amp;#160;Wed,&amp;#160;17&amp;#160;Jan&amp;#160;2007&amp;#160;19&amp;#58;24&amp;#58;22&amp;#160;+0000&lt;br /&gt;
smtp_setup_msg&amp;#160;entered&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
When you get to this point you are ready to start an SMTP &#039;conversation&#039; with Exim.  First introduce yourself to Exim using the SMTP &#039;EHLO localhost&#039; command:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;EHLO&amp;#160;localhost&lt;br /&gt;
SMTP&amp;#60;&amp;#60;&amp;#160;EHLO&amp;#160;localhost&lt;br /&gt;
sender_fullhost&amp;#160;=&amp;#160;localhost.munk.me.uk&amp;#160;&amp;#40;localhost&amp;#41;&amp;#160;&amp;#91;127.0.0.1&amp;#93;&lt;br /&gt;
sender_rcvhost&amp;#160;=&amp;#160;localhost.munk.me.uk&amp;#160;&amp;#40;&amp;#91;127.0.0.1&amp;#93;&amp;#160;helo=localhost&amp;#41;&lt;br /&gt;
set_process_info&amp;#58;&amp;#160;&amp;#160;3103&amp;#160;handling&amp;#160;incoming&amp;#160;connection&amp;#160;from&amp;#160;localhost.munk.me.uk&amp;#160;&amp;#40;localhost&amp;#41;&amp;#160;&amp;#91;127.0.0.1&amp;#93;&lt;br /&gt;
host&amp;#160;in&amp;#160;pipelining_advertise_hosts?&amp;#160;yes&amp;#160;&amp;#40;matched&amp;#160;&quot;&amp;#42;&quot;&amp;#41;&lt;br /&gt;
host&amp;#160;in&amp;#160;auth_advertise_hosts?&amp;#160;yes&amp;#160;&amp;#40;matched&amp;#160;&quot;&amp;#42;&quot;&amp;#41;&lt;br /&gt;
host&amp;#160;in&amp;#160;tls_advertise_hosts?&amp;#160;no&amp;#160;&amp;#40;option&amp;#160;unset&amp;#41;&lt;br /&gt;
250-win.munk.me.uk&amp;#160;Hello&amp;#160;localhost.munk.me.uk&amp;#160;&amp;#91;127.0.0.1&amp;#93;&lt;br /&gt;
250-SIZE&amp;#160;52428800&lt;br /&gt;
250-PIPELINING&lt;br /&gt;
250-AUTH&amp;#160;PLAIN&amp;#160;LOGIN&lt;br /&gt;
250&amp;#160;HELP&lt;br /&gt;
SMTP&amp;#62;&amp;#62;&amp;#160;250-win.munk.me.uk&amp;#160;Hello&amp;#160;localhost.munk.me.uk&amp;#160;&amp;#91;127.0.0.1&amp;#93;&lt;br /&gt;
250-SIZE&amp;#160;52428800&lt;br /&gt;
250-PIPELINING&lt;br /&gt;
250-AUTH&amp;#160;PLAIN&amp;#160;LOGIN&lt;br /&gt;
250&amp;#160;HELP&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
In response to your &#039;EHLO localhost&#039; command, Exim returns more debug information but most importantly for us it also indicates what authentication options it offers in this line:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;250-AUTH&amp;#160;PLAIN&amp;#160;LOGIN&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This indicates that currently acceptable AUTH methods are PLAIN and LOGIN.&lt;br /&gt;
&lt;br /&gt;
We can then test the PLAIN login method using the &quot;\0dummy\0dummy&quot; user:password pair we encoded above:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;AUTH&amp;#160;PLAIN&amp;#160;AGR1bW15AGR1bW15&lt;br /&gt;
SMTP&amp;#60;&amp;#60;&amp;#160;AUTH&amp;#160;PLAIN&amp;#160;AGR1bW15AGR1bW15&lt;br /&gt;
Running&amp;#160;pwcheck&amp;#160;authentication&amp;#160;for&amp;#160;user&amp;#160;&quot;dummy&quot;&lt;br /&gt;
pwcheck&amp;#58;&amp;#160;success&amp;#160;&amp;#40;NULL&amp;#41;&lt;br /&gt;
plain&amp;#160;authenticator&amp;#58;&lt;br /&gt;
&amp;#160;&amp;#160;$1&amp;#160;=&lt;br /&gt;
&amp;#160;&amp;#160;$2&amp;#160;=&amp;#160;dummy&lt;br /&gt;
&amp;#160;&amp;#160;$3&amp;#160;=&amp;#160;dummy&lt;br /&gt;
expanded&amp;#160;string&amp;#58;&amp;#160;1&lt;br /&gt;
SMTP&amp;#62;&amp;#62;&amp;#160;235&amp;#160;Authentication&amp;#160;succeeded&lt;br /&gt;
235&amp;#160;Authentication&amp;#160;succeeded&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This indicates that authentication for &#039;dummy:dummy&#039; would succeed and mail would be relayed (pending further conditional checks by Exim).&lt;br /&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
So we now have a working Exim with support for spam/malware checking and authentication over SMTP. 
    </content:encoded>

    <pubDate>Wed, 17 Jan 2007 20:19:00 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/212-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Mutt Auto Save Hooks</title>
    <link>http://freebsd.munk.me.uk/archives/184-Mutt-Auto-Save-Hooks.html</link>
            <category>Email</category>
            <category>Mutt</category>
    
    <comments>http://freebsd.munk.me.uk/archives/184-Mutt-Auto-Save-Hooks.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=184</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=184</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    &lt;strong&gt;UPDATE:&lt;/strong&gt;&lt;br /&gt;
I&#039;ve updated the perl script to allow user input of the save hook.&lt;br /&gt;
Also importantly I forgot to mention in the article originally that you must add the string &#039;#SAVE AND FCC HOOKS&#039; at the place in your ~/.muttrc file where you want the save hooks to be saved!&lt;br /&gt;
&lt;br /&gt;
This is a recipe for automatically creating save-hooks in the Mutt mail client.  The recipe allows you to bind the function to a key - I use &#039;esc H&#039; - so when you receive mail say from &#039;munk @ munk.me.uk&#039;, you hit &#039;esc H&#039; and mutt will create a save-hook that saves any mail from that address to &#039;munk.me.uk&#039;.  That way when you hit &#039;s&#039; to save the mail to a folder, mutt will automatically prompt you to save the mail to &#039;munk.me.uk&#039;.&lt;br /&gt;
&lt;br /&gt;
The recipe involves editing the ~/.muttrc file and the creation of a perl script to do the work.  It also requires formail (part of procmail iirc).  The script is based on an original script by &lt;a href=&quot;http://marc.10east.com/?l=mutt-users&amp;m=104422326212956&amp;w=2&quot;  title=&quot;Script for adding save hooks on Mutt mailing list&quot;&gt;Eric Smith on the mutt mailing list&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
First add this to your ~/.muttrc file:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;#&amp;#160;Notes&amp;#58;&lt;br /&gt;
#&amp;#160;&lt;br /&gt;
#&amp;#160;Modify&amp;#160;the&amp;#160;paths&amp;#160;to&amp;#160;the&amp;#160;&#039;hookgen.pl&#039;&amp;#160;script&amp;#160;as&amp;#160;needed&amp;#160;&lt;br /&gt;
#&amp;#160;-&amp;#160;it&amp;#160;should&amp;#160;be&amp;#160;the&amp;#160;location&amp;#160;you&amp;#160;decide&amp;#160;to&amp;#160;save&amp;#160;the&amp;#160;perl&amp;#160;script&amp;#160;as.&lt;br /&gt;
#&lt;br /&gt;
#&amp;#160;Modify&amp;#160;the&amp;#160;temp&amp;#160;file&amp;#160;path&amp;#160;if&amp;#160;you&amp;#160;want.&amp;#160;&amp;#160;&lt;br /&gt;
#&amp;#160;/tmp&amp;#160;should&amp;#160;be&amp;#160;fine&amp;#160;though&amp;#160;unless&amp;#160;you&amp;#160;have&amp;#160;a&amp;#160;busy&amp;#160;server&amp;#160;and&amp;#160;don&#039;t&amp;#160;want&amp;#160;to&amp;#160;&lt;br /&gt;
#&amp;#160;risk&amp;#160;others&amp;#160;seeing&amp;#160;who&amp;#160;you&amp;#160;receive&amp;#160;mail&amp;#160;from.&lt;br /&gt;
#&lt;br /&gt;
#&amp;#160;The&amp;#160;file&amp;#160;after&amp;#160;the&amp;#160;&#039;&amp;#58;source&#039;&amp;#160;command&amp;#160;should&amp;#160;be&amp;#160;the&amp;#160;file&amp;#160;that&amp;#160;you&amp;#160;want&amp;#160;to&amp;#160;contain&amp;#160;the&amp;#160;save&amp;#160;hooks&amp;#160;in.&lt;br /&gt;
#&amp;#160;In&amp;#160;my&amp;#160;setup&amp;#160;I&amp;#160;have&amp;#160;all&amp;#160;my&amp;#160;hooks&amp;#160;in&amp;#160;a&amp;#160;separate&amp;#160;file,&amp;#160;~/.mutt/mutt.hooks,&amp;#160;which&amp;#160;is&amp;#160;sourced&amp;#160;from&amp;#160;my&amp;#160;main&lt;br /&gt;
#&amp;#160;~/.muttrc&amp;#160;file.&lt;br /&gt;
#&lt;br /&gt;
#&amp;#160;There&amp;#160;are&amp;#160;3&amp;#160;bindings,&amp;#160;one&amp;#160;for&amp;#160;each&amp;#160;mutt&amp;#160;&#039;view&#039;&amp;#58;&lt;br /&gt;
macro&amp;#160;index&amp;#160;\eH&amp;#160;&quot;&amp;#60;pipe-message&amp;#62;formail&amp;#160;-X&amp;#160;\&lt;br /&gt;
From&amp;#58;&amp;#62;/tmp/hookgen.pl_cache\n&amp;#60;shell-escape&amp;#62;/home/munk/bin/perl/mutt/hookgen.pl\n&amp;#58;source&amp;#160;\&lt;br /&gt;
~/.mutt/mutt.hooks\n&quot;&amp;#160;&quot;Edit&amp;#160;mutt&amp;#160;hooks&amp;#160;file&amp;#160;and&amp;#160;reload&amp;#160;it&quot;&lt;br /&gt;
macro&amp;#160;pager&amp;#160;\eH&amp;#160;\&lt;br /&gt;
&quot;&amp;#60;pipe-message&amp;#62;formail&amp;#160;-X&amp;#160;\&lt;br /&gt;
From&amp;#58;&amp;#62;/tmp/hookgen.pl_cache\n&amp;#60;shell-escape&amp;#62;/home/munk/bin/perl/mutt/hookgen.pl\n&amp;#58;source&amp;#160;\&lt;br /&gt;
~/.mutt/mutt.hooks\n&quot;&amp;#160;&quot;Edit&amp;#160;mutt&amp;#160;hooks&amp;#160;file&amp;#160;and&amp;#160;reload&amp;#160;it&quot;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This presumes you&#039;re using the key sequence &#039;ESC H&#039; - the escape key followed by a capital H - to bind the function.  Feel free to use another keystroke.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the point in your ~/.muttrc file that you want the save-hook saving, add the following:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;&#039;#SAVE&amp;#160;AND&amp;#160;FCC&amp;#160;HOOKS&#039;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Now create and save the following perl script for the above macro binding to use.  Please note I didn&#039;t originally write this script, I based it on a script by Eric Smith in the URL below.  You might want to read the original mail because he uses a slightly different approach.  You can debug the script on the commandline by uncommenting the line starting &#039;#$debug&#039;.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the script:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bb-code-title&quot;&gt;CODE:&lt;/div&gt;&lt;div class=&quot;bb-code&quot;&gt;#!/usr/bin/perl&amp;#160;-w&lt;br /&gt;
#&amp;#160;Original&amp;#160;idea&amp;#160;with&amp;#160;thanks&amp;#160;to&amp;#160;Eric&amp;#160;Smith.&lt;br /&gt;
#&amp;#160;see&amp;#160;here&amp;#58;&amp;#160;http&amp;#58;//marc.10east.com/?l=mutt-users&amp;amp;m=104422326212956&amp;amp;w=2&lt;br /&gt;
&lt;br /&gt;
#&amp;#160;Overview&amp;#58;&lt;br /&gt;
#&amp;#160;This&amp;#160;script&amp;#160;allows&amp;#160;you&amp;#160;to&amp;#160;create&amp;#160;save&amp;#160;hooks&amp;#160;in&amp;#160;mutt.&amp;#160;&amp;#160;Add&amp;#160;the&amp;#160;following&amp;#160;to&lt;br /&gt;
#&amp;#160;your&amp;#160;~/.muttrc&amp;#160;file&amp;#58;&lt;br /&gt;
#&lt;br /&gt;
#&amp;#160;macro&amp;#160;index&amp;#160;\eH&amp;#160;&quot;&amp;#60;pipe-message&amp;#62;formail&amp;#160;-X&amp;#160;From&amp;#58;&amp;#62;/tmp/hookgen.pl_cache\n&amp;#160;\&lt;br /&gt;
#&amp;#160;&amp;#60;shell-escape&amp;#62;/home/munk/bin/perl/mutt/hookgen.pl\n&amp;#58;source&amp;#160;~/.mutt/mutt.hooks\n&quot;&amp;#160;\&lt;br /&gt;
#&amp;#160;&quot;Edit&amp;#160;mutt&amp;#160;hooks&amp;#160;file&amp;#160;and&amp;#160;reload&amp;#160;it&quot;&lt;br /&gt;
#&amp;#160;macro&amp;#160;pager&amp;#160;\eH&amp;#160;#&amp;#160;&quot;&amp;#60;pipe-message&amp;#62;formail&amp;#160;-X&amp;#160;#&amp;#160;From&amp;#58;&amp;#62;/tmp/hookgen.pl_cache\n&amp;#160;\&amp;#160;&lt;br /&gt;
#&amp;#160;&amp;#60;shell-escape&amp;#62;/home/munk/bin/perl/mutt/hookgen.pl\n&amp;#58;source&amp;#160;~/.mutt/mutt.hooks\n&quot;&amp;#160;\&lt;br /&gt;
#&amp;#160;&quot;Edit&amp;#160;mutt&amp;#160;hooks&amp;#160;file&amp;#160;and&amp;#160;reload&amp;#160;it&quot;&lt;br /&gt;
#&lt;br /&gt;
#&amp;#160;substituting&amp;#58;&lt;br /&gt;
#&amp;#160;/tmp/hookgen.pl_cache&amp;#160;for&amp;#160;the&amp;#160;location&amp;#160;you&amp;#160;want&amp;#160;to&amp;#160;store&amp;#160;the&amp;#160;&#039;From&#039;&amp;#160;header&lt;br /&gt;
#&amp;#160;temporarily&lt;br /&gt;
#&amp;#160;&lt;br /&gt;
#&amp;#160;/home/munk/bin/perl/hookgen.pl&amp;#160;for&amp;#160;the&amp;#160;location&amp;#160;of&amp;#160;this&amp;#160;script.&lt;br /&gt;
#&lt;br /&gt;
#&amp;#160;~/.mutt/mutt.hooks&amp;#160;for&amp;#160;the&amp;#160;file&amp;#160;you&amp;#160;want&amp;#160;to&amp;#160;save&amp;#160;the&amp;#160;hooks&amp;#160;into,&amp;#160;normally&amp;#160;this&amp;#160;will&amp;#160;be&amp;#160;your&amp;#160;~/.muttrc&lt;br /&gt;
#&amp;#160;&lt;br /&gt;
#&amp;#160;IMPORTANTLY&amp;#58;&amp;#160;add&amp;#160;the&amp;#160;following&amp;#160;in&amp;#160;the&amp;#160;file&amp;#160;you&amp;#160;want&amp;#160;to&amp;#160;save&amp;#160;the&amp;#160;hooks&amp;#160;to&amp;#58;&lt;br /&gt;
#&amp;#160;&#039;#SAVE&amp;#160;AND&amp;#160;FCC&amp;#160;HOOKS&#039;&amp;#160;&amp;#40;everything&amp;#160;inside&amp;#160;the&amp;#160;quotes&amp;#41;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
use&amp;#160;strict;&lt;br /&gt;
my&amp;#160;$cmd&amp;#160;=&amp;#160;undef;&lt;br /&gt;
my&amp;#160;$regexp&amp;#160;=&amp;#160;undef;&lt;br /&gt;
my&amp;#160;$folder&amp;#160;=&amp;#160;undef;&lt;br /&gt;
my&amp;#160;$alt_hook&amp;#160;=&amp;#160;undef;&lt;br /&gt;
my&amp;#160;$domain&amp;#160;=&amp;#160;undef;&lt;br /&gt;
my&amp;#160;$save_hook&amp;#160;=&amp;#160;undef;&lt;br /&gt;
my&amp;#160;$debug&amp;#160;=&amp;#160;undef;&lt;br /&gt;
&lt;br /&gt;
#&amp;#160;set&amp;#160;this&amp;#160;to&amp;#160;the&amp;#160;name&amp;#160;of&amp;#160;the&amp;#160;temp&amp;#160;file&amp;#160;used&amp;#160;in&amp;#160;the&amp;#160;muttrc&amp;#160;bind&amp;#160;directive&amp;#160;for&lt;br /&gt;
#&amp;#160;this&amp;#160;macro&amp;#58;&lt;br /&gt;
my&amp;#160;$tmp_file&amp;#160;=&amp;#160;&#039;/tmp/hookgen.pl_cache&#039;;&lt;br /&gt;
&lt;br /&gt;
#&amp;#160;set&amp;#160;this&amp;#160;to&amp;#160;the&amp;#160;file&amp;#160;you&amp;#160;want&amp;#160;to&amp;#160;save&amp;#160;the&amp;#160;hooks&amp;#160;to&amp;#160;-&amp;#160;make&amp;#160;sure&amp;#160;the&amp;#160;hook&amp;#160;file&lt;br /&gt;
#&amp;#160;has&amp;#160;the&amp;#160;text&amp;#160;&#039;#SAVE&amp;#160;AND&amp;#160;FCC&amp;#160;HOOKS&#039;&amp;#160;in&amp;#160;it!&amp;#58;&lt;br /&gt;
my&amp;#160;$hook_file&amp;#160;=&amp;#160;&#039;/home/munk/.mutt/mutt.hooks&#039;;&lt;br /&gt;
&lt;br /&gt;
#&amp;#160;To&amp;#160;debug&amp;#160;the&amp;#160;script,&amp;#160;uncomment&amp;#160;the&amp;#160;following&amp;#160;line&amp;#58;&lt;br /&gt;
#&amp;#160;$debug&amp;#160;=&amp;#160;&#039;From&amp;#58;&amp;#160;&quot;John&amp;#160;Smith&quot;&amp;#160;&amp;#60;john.smith@example.com&amp;#62;&#039;;&lt;br /&gt;
&lt;br /&gt;
`echo&amp;#160;&#039;$debug&#039;&amp;#160;&amp;#62;&amp;#160;$tmp_file`&amp;#160;if&amp;#160;$debug;&lt;br /&gt;
&lt;br /&gt;
open&amp;#160;CACHE,&amp;#160;&quot;&amp;#60;/tmp/hookgen.pl_cache&quot;&amp;#160;or&amp;#160;die&amp;#160;&quot;Cannot&amp;#160;open&amp;#160;/tmp/hookgen.pl_cache&amp;#160;$!&quot;;&lt;br /&gt;
while&amp;#160;&amp;#40;&amp;#60;CACHE&amp;#62;&amp;#41;&amp;#160;{&lt;br /&gt;
	if&amp;#40;/^from&amp;#58;/i&amp;#41;{&lt;br /&gt;
		chomp;&lt;br /&gt;
		/.&amp;#42;\@&amp;#40;&amp;#91;^&amp;#62;&amp;#93;&amp;#42;&amp;#41;/i;&lt;br /&gt;
		$domain&amp;#160;=&amp;#160;$1;&lt;br /&gt;
&amp;#160;&amp;#160;}&lt;br /&gt;
}&lt;br /&gt;
$regexp&amp;#160;=&amp;#160;$folder&amp;#160;=&amp;#160;$domain;&lt;br /&gt;
close&amp;#160;CACHE;&lt;br /&gt;
&lt;br /&gt;
$save_hook=&quot;save-hook&amp;#160;&#039;~f&amp;#160;$regexp&#039;&amp;#160;+/$folder&quot;;&lt;br /&gt;
&lt;br /&gt;
while&amp;#40;&amp;#41;{&lt;br /&gt;
	print&amp;#160;&quot;Save&amp;#160;hook&amp;#160;to&amp;#160;be&amp;#160;added&amp;#58;\n\n$save_hook\n\n&quot;;&lt;br /&gt;
	print&amp;#160;&quot;Hit&amp;#160;enter&amp;#160;to&amp;#160;save,&amp;#160;enter&amp;#160;an&amp;#160;alternative&amp;#160;save-hook,&amp;#160;or&amp;#160;hit&amp;#160;ctrl-c&amp;#160;to&amp;#160;exit&amp;#58;\n&quot;;&lt;br /&gt;
&lt;br /&gt;
	chomp&amp;#40;$alt_hook&amp;#160;=&amp;#160;&amp;#60;STDIN&amp;#62;&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
	if&amp;#160;&amp;#40;$alt_hook&amp;#160;eq&amp;#160;&quot;&quot;&amp;#41;{&lt;br /&gt;
		last;&lt;br /&gt;
	}&amp;#160;else&amp;#160;{&lt;br /&gt;
		$save_hook&amp;#160;=&amp;#160;$alt_hook&amp;#160;;&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$cmd&amp;#160;=&amp;#160;&#039;perl&amp;#160;-pi&amp;#160;-e&amp;#160;&quot;s@&amp;#40;?&amp;#60;=#SAVE&amp;#160;AND&amp;#160;FCC&amp;#160;HOOKS&amp;#41;@\n&#039;&amp;#160;.&amp;#160;$save_hook&amp;#160;.&amp;#160;&#039;@&quot;&amp;#160;&#039;&amp;#160;.&amp;#160;$hook_file;&lt;br /&gt;
&lt;br /&gt;
if&amp;#40;$debug&amp;#41;{&lt;br /&gt;
	print&amp;#160;&quot;Running&amp;#160;in&amp;#160;debug&amp;#160;mode&amp;#58;\n\n&quot;;&lt;br /&gt;
	print&amp;#160;&quot;Would&amp;#160;have&amp;#160;saved&amp;#160;this&amp;#160;hook&amp;#58;\n\n$save_hook\n\n&quot;;&lt;br /&gt;
	print&amp;#160;&quot;to&amp;#160;this&amp;#160;hook&amp;#160;file&amp;#58;\n\n$hook_file\n&quot;;&lt;br /&gt;
	print&amp;#160;&quot;Using&amp;#160;this&amp;#160;command&amp;#58;\n\n$cmd\n&quot;;&lt;br /&gt;
}&amp;#160;else&amp;#160;{&lt;br /&gt;
	system&amp;#160;qq|$cmd|;&lt;br /&gt;
}&lt;/div&gt; 
    </content:encoded>

    <pubDate>Wed, 13 Sep 2006 17:51:02 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/184-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Forwarding Mail To Gmail</title>
    <link>http://freebsd.munk.me.uk/archives/151-Forwarding-Mail-To-Gmail.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/151-Forwarding-Mail-To-Gmail.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=151</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=151</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    I had the good fortune to be given a gmail account a while ago (thanks elybis!) and planned to use it mainly for mailing list messages.  Being able to search through years worth of mailing lists instantly sounded ideal and with that I set to forwarding all the current mailing list messages I have for certain lists on to my gmail account...&lt;br /&gt;
&lt;br /&gt;
Read the extended article for info on bouncing mail to gmail with mutt (miserable failure), reconfiguring Exim to handle bouncing mail to gmail more effectively and using a perl script to streamline injecting messages into the Exim mail queue for delivery to Gmail.&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://freebsd.munk.me.uk/archives/151-Forwarding-Mail-To-Gmail.html#extended&quot;&gt;Continue reading &quot;Forwarding Mail To Gmail&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 25 Aug 2004 17:48:15 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/151-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Email Related Perl Scripts</title>
    <link>http://freebsd.munk.me.uk/archives/115-Email-Related-Perl-Scripts.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/115-Email-Related-Perl-Scripts.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=115</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=115</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    There are a number of interesting email related perl scripts here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.cpan.org/scripts/mailstuff/&quot;&gt;http://www.cpan.org/scripts/mailstuff/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Stumbled across this after &lt;a href=&quot;http://forums.devshed.com/showthread.php?p=555264&quot;&gt;a question by Manuel Hirsch on the Devshed Forum&lt;/a&gt; asking how to delete all duplicate emails from an mbox format mail spool/file/folder. 
    </content:encoded>

    <pubDate>Sat, 06 Mar 2004 18:29:51 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/115-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Happy Birthday Spam</title>
    <link>http://freebsd.munk.me.uk/archives/114-Happy-Birthday-Spam.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/114-Happy-Birthday-Spam.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=114</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=114</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Today is the 10th birthday of spam - not sure whether to be happy about this... :P&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://news.netcraft.com/archives/2004/03/05/spams_tenth_birthday_today.html&quot;&gt;Spam&#039;s Tenth Birthday&lt;/a&gt; 
    </content:encoded>

    <pubDate>Fri, 05 Mar 2004 17:26:56 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/114-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Microsoft Tackle Spam</title>
    <link>http://freebsd.munk.me.uk/archives/108-Microsoft-Tackle-Spam.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/108-Microsoft-Tackle-Spam.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=108</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=108</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    After making some noises about tackling the spam problem, &lt;a href=&quot;http://www.microsoft.com/mscorp/twc/privacy/spam_callerid.mspx&quot;&gt;Microsoft have just released information about their initiative to tackle the problem&lt;/a&gt;.  The initiative is dubbed &#039;Caller-ID For Email and works along the lines of adding extra info to DNS records to identify where email is allowed to originate from for a given domain.&lt;br /&gt;
&lt;br /&gt;
This idea is almost identical to that put forward by the &lt;a href=&quot;http://jez.hancock-family.com/index.php?/archives/85_Sender_Permitted_From__SPF__Yet_Another_Solution_To_Spam.html&quot;&gt;SPF Folk&lt;/a&gt;, although the caller-id approach uses XML in the DNS records instead of plaintext - which the SPF approach uses.  This could have the downside of breaking or causing unnecessary DNS traffic with increased packet sizes being required to transport XML encapsulated DNS data.&lt;br /&gt;
&lt;br /&gt;
The caller-id approach also requires the full message to be read by the MTA before any action is appropriated.  This could potentially increase SMTP traffic, leading to a waste of bandwidth.&lt;br /&gt;
&lt;br /&gt;
Only time will tell which approach will be taken up.&lt;br /&gt;
&lt;br /&gt;
Original article here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.eweek.com/article2/0,4149,1537711,00.asp&quot;&gt;MS Caller ID Plan Boosts SMTP Authentication &lt;/a&gt; 
    </content:encoded>

    <pubDate>Fri, 27 Feb 2004 21:21:14 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/108-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>MailGraph Modified For Exim</title>
    <link>http://freebsd.munk.me.uk/archives/106-MailGraph-Modified-For-Exim.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/106-MailGraph-Modified-For-Exim.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=106</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=106</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Christian G. Warden has just kindly sent me an email detailing the location of a modified version of the &lt;a href=&quot;http://people.ee.ethz.ch/~dws/software/mailgraph/&quot;&gt;mailgraph&lt;/a&gt; tool which keeps track of messages rejected in different classes by exim.&lt;br /&gt;
&lt;br /&gt;
The modified package can be found here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://postica.net/software/mailgraph/&quot;&gt;http://postica.net/software/mailgraph/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks Christian! 
    </content:encoded>

    <pubDate>Tue, 17 Feb 2004 12:12:46 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/106-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Selective Spam Filtering System For Exim</title>
    <link>http://freebsd.munk.me.uk/archives/104-Selective-Spam-Filtering-System-For-Exim.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/104-Selective-Spam-Filtering-System-For-Exim.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=104</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=104</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    This is a HOWTO guide for setting up a selecting spam filtering system on Exim:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.sprocket.lboro.ac.uk/~ron/email/SPAM_filtering_system.htm&quot;&gt;Selective Spam Filtering System For Exim&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Note this is very similar in fact to a method detailed in the &lt;a href=&quot;http://duncanthrax.net/exiscan-acl/&quot;&gt;Exiscan&lt;/a&gt; ACL examples found here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://duncanthrax.net/exiscan-acl/exiscan-acl-examples.txt&quot;&gt;exiscan-acl example configurations / FAQ&lt;/a&gt; - search for &#039;6. Having multiple content scanning profiles for several&#039; 
    </content:encoded>

    <pubDate>Thu, 12 Feb 2004 12:21:52 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/104-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>SPF Records Added</title>
    <link>http://freebsd.munk.me.uk/archives/102-SPF-Records-Added.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/102-SPF-Records-Added.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=102</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=102</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Just added a bunch of DNS &lt;a href=&quot;http://spf.pobox.com/&quot;&gt;SPF&lt;/a&gt; TXT records for the domains I send email for.  Lets hope that eventually when the uptake of SPF checking takes off - and it will right? - that this helps cut down on spam. 
    </content:encoded>

    <pubDate>Thu, 12 Feb 2004 12:02:22 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/102-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>&quot;Reply-To&quot; Munging Considered Harmful</title>
    <link>http://freebsd.munk.me.uk/archives/96-Reply-To-Munging-Considered-Harmful.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/96-Reply-To-Munging-Considered-Harmful.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=96</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=96</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Just a personal bookmark for myself:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.unicom.com/pw/reply-to-harmful.html&quot;&gt;&quot;Reply-To&quot; Munging Considered Harmful&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Tue, 10 Feb 2004 15:26:05 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/96-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Patch Released For ClamAV On FreeBSD</title>
    <link>http://freebsd.munk.me.uk/archives/92-Patch-Released-For-ClamAV-On-FreeBSD.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/92-Patch-Released-For-ClamAV-On-FreeBSD.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=92</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=92</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    Woot - just found &lt;a href=&quot;http://marc.theaimsgroup.com/?l=exim-users&amp;m=107633707631852&amp;w=2&quot;&gt;a post&lt;/a&gt; on the exim-users list by Oliver Eikemeier that allegedly stops a DOS caused by ClamAV crashing and stopping mail being processed - sounds like the problem I was having &lt;a href=&quot;http://jez.hancock-family.com/index.php?/archives/87_ClamAV_Broken.html&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Anyway I just applied the patch and reinstated the &lt;a href=&quot;http://jez.hancock-family.com/index.php?/archives/84_Installing_Configuring_and_Testing_ClamAV_On_FreeBSD_Exim.html&quot;&gt;ClamAV Exiscan ACL&lt;/a&gt;, so fingers crossed the clamd daemon stays up a little longer than last time.&lt;br /&gt;
&lt;br /&gt;
The patch is included in the extended article &#039;just in case&#039;. &lt;br /&gt;
:P&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://freebsd.munk.me.uk/archives/92-Patch-Released-For-ClamAV-On-FreeBSD.html#extended&quot;&gt;Continue reading &quot;Patch Released For ClamAV On FreeBSD&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 09 Feb 2004 16:18:32 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/92-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>ClamAV Broken</title>
    <link>http://freebsd.munk.me.uk/archives/87-ClamAV-Broken.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/87-ClamAV-Broken.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=87</wfw:comment>

    <slash:comments>3</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=87</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    After &lt;a href=&quot;http://jez.hancock-family.com/index.php?/archives/84_Installing_Configuring_and_Testing_ClamAV_On_FreeBSD_Exim.html&quot;&gt;installing and configuring clamav&lt;/a&gt;, I left the thing running overnight and found the next day that the clamd av scanner daemon had been down for about 16 hours. Lots of mail was dropped because of this - the clamav acl fails and so mail is temporarily deferred. It seems that clamav is known for not being the most stable of daemons, hopefully recent development on the daemon will make it more stable - running in processes instead of threads. I had thought and tried to get clamd working with &lt;a href=&quot;http://cr.yp.to/daemontools.html&quot;&gt;daemontools&lt;/a&gt;, but ran into problems with this method. I can live without the av scanner for now..  
    </content:encoded>

    <pubDate>Thu, 05 Feb 2004 12:48:43 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/87-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Exim Cookbook</title>
    <link>http://freebsd.munk.me.uk/archives/86-Exim-Cookbook.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/86-Exim-Cookbook.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=86</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=86</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    This forum contains a lot of useful cookbook style recipes for Exim:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://exim.got-there.com/forums/&quot;&gt;The Unofficial Exim MTA Info Forums&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Worth a visit if you&#039;re after examples of how to configure Exim. :P 
    </content:encoded>

    <pubDate>Tue, 03 Feb 2004 19:08:23 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/86-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Sender Permitted From - SPF - Yet Another Solution To Spam?</title>
    <link>http://freebsd.munk.me.uk/archives/85-Sender-Permitted-From-SPF-Yet-Another-Solution-To-Spam.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/85-Sender-Permitted-From-SPF-Yet-Another-Solution-To-Spam.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=85</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=85</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    &lt;a href=&quot;http://spf.pobox.com/&quot;&gt;Sender Permitted From or SPF&lt;/a&gt; - is an initiative aimed at reducing spam and malware through the introduction of a DNS based grammar which describes where a domain sends email from - in effect a &#039;reverse-MX&#039; record.&lt;br /&gt;
&lt;br /&gt;
See also the excellent &lt;a href=&quot;http://spftools.infinitepenguins.net&quot;&gt;SPF Tools Site&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://freebsd.munk.me.uk/archives/85-Sender-Permitted-From-SPF-Yet-Another-Solution-To-Spam.html#extended&quot;&gt;Continue reading &quot;Sender Permitted From - SPF - Yet Another Solution To Spam?&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 03 Feb 2004 19:03:40 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/85-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>
<item>
    <title>Installing, Configuring and Testing ClamAV On FreeBSD Exim</title>
    <link>http://freebsd.munk.me.uk/archives/84-Installing,-Configuring-and-Testing-ClamAV-On-FreeBSD-Exim.html</link>
            <category>Email</category>
    
    <comments>http://freebsd.munk.me.uk/archives/84-Installing,-Configuring-and-Testing-ClamAV-On-FreeBSD-Exim.html#comments</comments>
    <wfw:comment>http://freebsd.munk.me.uk/wfwcomment.php?cid=84</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://freebsd.munk.me.uk/rss.php?version=2.0&amp;type=comments&amp;cid=84</wfw:commentRss>
    

    <author>nospam@example.com (munk)</author>
    <content:encoded>
    This is a HOWTO style guide to installing, configuring and testing the &lt;a href=&quot;http://www.clamav.net/&quot;&gt;ClamAV&lt;/a&gt; anti-virus scanner on FreeBSD, including details on integrating support for mail-scanning with clamav into Exim.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://freebsd.munk.me.uk/archives/84-Installing,-Configuring-and-Testing-ClamAV-On-FreeBSD-Exim.html#extended&quot;&gt;Continue reading &quot;Installing, Configuring and Testing ClamAV On FreeBSD Exim&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 03 Feb 2004 13:54:35 +0000</pubDate>
    <guid isPermaLink="false">http://freebsd.munk.me.uk/archives/84-guid.html</guid>
    <creativeCommons:license>http://creativecommons.org/licenses/by/2.5/</creativeCommons:license>
</item>

</channel>
</rss>