-------------------- Mail Transfer Agents -------------------- This file is ONLY for people who want to set up global filtering through the mail server for ALL users on a system. If all you want to do is set up filtering for yourself, just ignore this file and go back INSTALL! Note: Many spastic recipes shell out from procmail to run grep, dig or read the external reject files. This requires that each user on your system that can receive e-mail have a valid shell in /etc/passwd. Users that do not have a valid shell such as daemons should be aliased in your MTA to a real user that can receive e-mail sent to them. SPASTIC was primarily designed to deal with spam from a user point of view, meaning it is meant to be installed by a user to filter mail being delivered locally through the .forward and procmail mechanism. It is possible to filter ALL incoming mail for ALL users by hooking procmail into the Mail Transfer Agent (MTAs) such as Sendmail, Postfix, Qmail, Exim, or others. Since SPASTIC is making shell calls to filter mail, this could slow down mail delivery on a very busy mail server. Use your own judgment to decide whether global mail filtering using procmail makes sense in your environment. Many MTAs include some ability to filter incoming mail separate from procmail. A popular option to set up is have the MTA check the Realtime Blackhole List for known spammers and deny receiving the e-mail at all. Please visit http://www.mail-abuse.org/ for more information. Another option gaining in popularity is Vipul's Razor, a distributed system designed to detect and stop mass spam in the process of delivery. I have never used Vipul's Razor and it appears that it could be used to maliciously block valid e-mail so use due diligence. Having said all that, here are some instructions on setting up global SPASTIC filtering for MTAs. ------- Postfix ------- This was tested using Postfix-20010228pl08. # IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN # ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER. If you want to use procmail to deliver ALL local mail, make sure this line is in the main.cf file: mailbox_command = /usr/bin/procmail -m /etc/procmailrc In this case, the /etc/procmailrc file will act as a global filter for all e-mail before delivering mail to local users. Copy the dot.procmailrc to /etc/procmailrc and edit if necessary. The variables will be assigned correctly (mail gets delivered to the $HOME/Mail directory of each user) and the filters are read from the $HOME/.spastic directory for each user). This means that each mail user on the system must have the spastic directories OR /etc/procmailrc must be changed to look for them in a common area, such as /etc/spastic. If each has their own set of filters, they can customize them as they see fit. If you choose to have a common set, then everyone can benefit from the filters without having to maintain their own set. Note that if procmail/spastic is used globally, the user does NOT need a .forward or .procmailrc file. It's all handled by Postfix. Procmail will create a $HOME/Mail/procmail.log file for each user when mail is delivered. Now, restart postfix (as root) with "postfix reload". -------- Sendmail -------- From the original SPAST file, here is something that may help with the beast otherwise known as sendmail. Your sendmail config file should have something along the lines of: Mlocal, P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=10/30, R=20/40, A=procmail -Y -a $h -d $u and/or Mprocmail, P=/usr/bin/procmail, F=DFMSPhnu9, S=11/31, R=21/31, T=DNS/RFC822/X-Unix, A=procmail -Y -m $h $f $u (be sure to change the path for procmail if necessary)