Wednesday, July 27, 2005

HOWTO : MailScanner on Fedora

I followed this HOWTO posted by Andrew Bassett at FedoraNews:

Installing Sendmail, SpamAssassin, and Mailscanner on FC1


and found it to be almost entirely accurate a year later on FC4 and the current version of MailScanner. There are a few additions/corrections I would make:

1. Install clamav first. Its now in fedora extras so you should be able to simply:

yum install clamav

I skipped the create sendmail-cf, webmin, DCC, Pyzor, and Razor steps though I might install DCC and Pyzor if I don't get the spam killing results I want.

2. MailScanner is now its own service which starts two instances of sendmail(three if you count the client) so you have to disable sendmail and enable MailScanner. From the MailScanner INSTALL doc:

service sendmail stop
chkconfig sendmail off
chkconfig --level 2345 MailScanner on
service MailScanner start


3. The /etc/mail/domaintable relay setup requires you to have two domains registered. This is not necessary if you use an IP for the destination:

yourdomain.com      esmtp:[192.168.0.1]

I used a private IP in the above example because I suspect most of you will be running MailScanner on the firewall, or another box after it, and relaying the mail to an internal mail server (i.e. Domino or Exchange) on the LAN. You could also relay on a different port (read my previous post on how to do this.)

NOTE: You don't have to use an IP address in the mailertable example above. You can also use the brackets to turn of MX lookups for the destination so that the entry below doesn't cause a mail loop like it normally would:

yourdomain.com      esmtp:[internalhost.yourdomain.com]


The MailScanner conf file is lengthy but I found most of the defaults to be good enough to get going. The ability to edit the settings for SA, ClamAV, DCC, Pyzor, etc, from one file seems like a real plus.

0 comments: