7.2 Spam-Checking During Local Delivery

‚  < ‚  Day Day Up ‚  > ‚  

The easiest way to add SpamAssassin to a qmail system is to configure qmail to pipe messages through SpamAssassin during local delivery.

The advantages of this approach are:

  • It's easy to set up.

  • You can run spamd and can use spamc for faster spam-checking.

  • User preference files, autowhitelists, and Bayesian databases can be used, because qmail will invoke SpamAssassin as the user to whom it is delivering a message.

However, qmail runs a local delivery agent only for email destined for a local recipient. You cannot create a spam-checking gateway with this approach.

If you're using the installation described in the Life with qmail web site, the /var/qmail/control/defaultdelivery file contains a line that specifies either a directory (e.g., ./Maildir/ ) or a filename (e.g., ./Mailbox ). The /var/qmail/rc script passes the contents of defaultdelivery to qmail-start , and thence to qmail-lspawn and qmail-local .

If you deliver to a maildir directory, change the line in your defaultdelivery file to read:

 /usr/bin/spamc  maildir   ./Maildir/   

In this case, be sure you've installed the safecat package, which includes the maildir script. You can get safecat at http://www.pobox.com/~lbudney/linux/software/safecat.html.

If you deliver to a mailbox file in each user's home directory, install procmail and change the line in defaultdelivery to read:

 preline procmail 

In this case, the system's /etc/procmailrc file should have a default recipe that looks like this:

 :0fw * <300000 /usr/bin/spamc :0: $HOME/Mailbox 

The default delivery method is used only when users don't have their own .qmail files. This permits users to override spam-checking. Conversely, if you don't do spam-checking by default during local delivery, any user can add the preceding lines to her .qmail file and have her messages checked.


‚  < ‚  Day Day Up ‚  > ‚  


SpamAssassin
SpamAssassin
ISBN: 0596007078
EAN: 2147483647
Year: 2004
Pages: 88

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net