‚ < ‚ Day Day Up ‚ > ‚ |
One easy way to add SpamAssassin to an Exim system is to configure Exim to use procmail as its local delivery agent. Then add a procmail recipe for spam-tagging to /etc/procmailrc . The advantages of this approach are
However, Exim runs a local delivery agent only for email destined for a local recipient. You cannot create a spam-checking gateway with this approach. To configure Exim to use procmail for local delivery, add the following transport to the Exim configuration file (in the transports section): procmail_pipe: driver = pipe command = /usr/local/bin/procmail -d $local_part return_path_add delivery_date_add envelope_to_add check_string = "From " escape_string = ">From " user = $local_part group = mail Ensure that you provide the proper path to procmail and an appropriate group for running procmail in the definition of the procmail_pipe transport. Next add a new router to direct messages to the procmail_pipe transport. This router should be added to the routers section of the configuration file before (or in place of) the localuser router, which is usually the last router. procmail: driver = accept check_local_user transport = procmail_pipe cannot_route_message = Unknown user no_verify no_expn Local addresses that reach the procmail router will be accepted and delivered via the procmail_pipe transport, which invokes procmail in its role as a local delivery agent.
Next, configure procmail to invoke SpamAssassin. If you want to invoke SpamAssassin on behalf of every user, do so by editing the /etc/procmailrc file. Example 8-1 shows an /etc/procmailrc that invokes SpamAssassin. Example 8-1. A complete /etc/procmailrcDROPPRIVS=yes PATH=/bin:/usr/bin:/usr/local/bin SHELL=/bin/sh # Spamassassin :0fw * <300000 /usr/bin/spamassassin If you run spamd , replace the call to spamassassin in procmailrc with a call to spamc instead. Using spamc/spamd significantly improves performance on most systems but makes it more difficult to enable users to write their own rules. |
‚ < ‚ Day Day Up ‚ > ‚ |