Table of Contents

SpamAssassin

Information

Blugh, very mucky install - installed some xorg stuff for whatever reason…

Channel rules are stored here:

/usr/local/share/spamassassin

and the channel config files are stored here:

/var/db/spamassassin/3.002003/

Procedure

  1. Install SpamAssassin:
    # cd /usr/ports/mail/p5-Mail-SpamAssassin
    # make install clean


    I had to run make install a second time because it errored out the first time through - it completed the second time

  2. Once installed, setup saupdates and any extra rules channels (http://saupdates.openprotect.com/).
  3. Now create an auto-update script:
    #!/usr/local/bin/bash
    #
    
    SAUP=/usr/local/bin/sa-update
    
    $SAUP --gpgkey D1C035168C1EBC08464946DA258CDB3ABDE9DC10 --channel saupdates.openprotect.com --channel updates.spamassassin.org -D
  4. And run the above script - make sure it completes without errors.
  5. Add the above script to /etc/crontab:
    # SpamAssassin Rule Updater
    45      6       *       *       *       root    /root/scripts/spam-update/sa-auto-update.sh
  6. Now SpamAssassin's rules are fully updated, so we enable SpamAssassin in /etc/rc.conf:
    # SpamAssassin
    spamd_enable="YES"
  7. Procmail Setup: add the following to /usr/local/etc/procmailrc:
    :0fw: spamc.lock
    * < 256000
    | spamc
     
    # filter 5-star spam and greater
    :0:
    * ^X-Spam-Level: \*\*\*\*\*
    spam
     
    # Work around procmail bug: any output on stderr will cause the "F" in "From"
    # to be dropped.  This will re-add it.
    :0
    * ^^rom[ ]
    {
      LOG="*** Dropped F off From_ header! Fixing up. "
     
      :0 fhw
      | sed -e '1s/^/F/'
    }
  8. Finally, start the SpamAssassin spamd daemon:
    # /usr/local/etc/rc.d/sa-spamd start

List of installed packages