Skip to content

Instantly share code, notes, and snippets.

@carlhoerberg
Last active September 1, 2015 20:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlhoerberg/c2849efc0eb9ee7c8bf6 to your computer and use it in GitHub Desktop.
Save carlhoerberg/c2849efc0eb9ee7c8bf6 to your computer and use it in GitHub Desktop.
Spamassassin and postfix on Ubuntu 14.04

Install:

apt-get install spamassassin postfix

in /etc/postfix/master.cf modify;

smtp      inet  n       -       -       -       -       smtpd
  -o content_filter=spamassassin

and add:

spamassassin    unix  -       n       n       -       -       pipe
  flags=Rq user=nobody argv=/usr/bin/spamc -u ${user} -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}

Spamc will now be run as the user reciving the email and then delivered with sendmail back

service spamassassin restart
postfix reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment