Skip to topic | Skip to bottom
Home
Freebsd
Freebsd.FilterMailWithSpamAssassinAndProcMailr1.10 - 22 Nov 2003 - 17:09 - KirkStrausertopic end

Start of topic | Skip to actions



This is an alternative to the instructions at FilterMailWithSpamAssassinViaMilter.

The general theory is that incoming mail will be piped through ProcMail? and processed according to the "recipes" in each user's setup.

Advantages:

Disadvantages:

  • This really doesn't play nicely with SendMailAndCyrus. Sure, you can make it work, but it may be more trouble than it's
worth.

1. Install SpamAssassin

  • If you have PortInstall? (from the sysutils/portupgrade port):
    portinstall mail/p5-Mail-SpamAssassin
  • Otherwise:
    cd /usr/ports/mail/p5-Mail-SpamAssassin; make install; make clean

2. Install ProcMail

  • If you have PortInstall?:
    portinstall mail/procmail
  • Otherwise:
    cd /usr/ports/mail/procmail; make install; make clean

3. Decide whether to call spamassassin directly, or run it as a daemon

3.1 Calling it directly

Pros:

  • Easy to set up
  • Unlikely to fail
Cons:
  • Slow when processing many simultaneous requests

3.2 Running as a daemon

Pros:

  • Very fast at processing multiple requests
  • No startup overhead every time an email is processed
Cons:
  • Use to lose email if the client (spamc) could not contact the daemon (spamd). This is probably fixed.
  • A small amount of extra setup is required

To run spamd:

cd /usr/local/etc/rc.d
cp spamd.sh-dist spamd.sh
/usr/local/etc/rc.d/spamd.sh start

4. Make a default ProcMail rcfile with your favorite text editor so that it looks like this:

4.1 Calling spamassassin directly:

/root# cat /usr/local/etc/procmailrc
:0fw
| spamassassin -P

4.2 Calling the spamassassin daemon with spamc:

/root# cat /usr/local/etc/procmailrc
DROPPRIVS=yes
:0fw
| spamc

5. Configure SendMail to make ProcMail the MailDeliveryAgent?

  • If you haven't already done so, create a LocalSendmailConfiguration.
  • Edit your SendMail config file. Locate the MAILER(local) line near the bottom. Just before that line, insert a new line: FEATURE(local_procmail).
  • Your new configuration file should look something like this:
/root# cd /etc/mail; tail -n 3 host.domain.com.mc
FEATURE(local_procmail)
MAILER(local)
MAILER(smtp)

6. Return to FilterMailWithSpamAssassin to finish up.

-- KirkStrauser - 03 Jul 2003


Freebsd.FilterMailWithSpamAssassinAndProcMail moved from Freebsd.FilterMailWithSpamAssassin on 03 Jul 2003 - 17:36 by KirkStrauser - put it back
You are here: Freebsd > FreeBSD > FilterMailWithSpamAssassinAndProcMail

to top

Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Subwiki? Send feedback