SpamAssassin on CentOS 4 Quickly

published on 2006-12-14 in computing

Here's how I did it company wide:

  1. install spamassassin. I used an RPM for ease, and went with 3.1.x for it's sophisticated new filters and sa-update ability.
  2. install perl module dependancy for sa-update:

      # perl -MCPAN -e "install Archive::Tar;"
  3. install procmail

  4. run sa-update:

    # sa-update
  5. start up spamassassin:

    # /etc/init.d/spamd start
  6. create global procmail rule like this:

    # send mail thru spamassassin
    :0 fw
    * < 256000
    | /usr/bin/spamc -f -u $LOGNAME
    # All mail tagged as spam (eg. with a score higher than the set threshold)
    # is moved to "spam".
    * ^X-Spam-Status: Yes

  7. Don't forget to bootstrap SpamAssassin:

    # chkconfig --add spamassassin
    # chkconfig spamassassin on

Now all your users' mail that scores a 5.0 or greater (default settings) will go into a folder named 'spam'. Now isn't that nice.

Tags: spam email linux