SpamAssassin - jhu-information-security-institute/NwSec GitHub Wiki

Installation

  1. Install spamassassin using: $ sudo apt-get install spamassassin spamc
  2. Configure spamassassin
  3. Configure postfix to use spamassassin as a filter by adding the following lines to /etc/postfix/master.cf
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (no)    (never) (100)
    # ==========================================================================
    spamassassin unix -     n       n       -       -       pipe
        user=spamd argv=/usr/bin/spamc -f -e  
        /usr/sbin/sendmail -oi -f ${sender} ${recipient} 
    
  4. Enable spamassassin using: $ sudo systemctl enable spamassassin
  5. Reload the new configurations using: $ sudo systemctl daemon-reload
  6. Restart postfix using: $ sudo systemctl restart postfix
  7. Start spamassassin using: $ sudo systemctl start spamassassin

References