lunes, 16 de mayo de 2005

SpammAssasin + Postfix install

Para instalar sin procmail:
The following assumes you are wanting to use SpamAssassin directly and without
the use of Amavisd.
To get Postfix piping all mail recieved into SpamAssassin for tagging and
sending on to the recipient follow these steps.


As root, create a file at /usr/bin called "postfixfilter", it should contain
the following:
#!/bin/bash
/usr/bin/spamc | /usr/sbin/sendmail -i "$@"
exit $?
Make it executable with "chmod 755 /usr/bin/postfixfilter".
Create a user called "spamfilter" with a home directory and shell.
Make spamfilter the owner of postfixfilter "chown spamfilter
/usr/bin/postfixfilter".
Edit the Services and Interfaces to non-Postfix software sections as follows:
Under the Services section locate the smtp line like this one:
smtp inet n - n - - smtpd

Directly below it CREATE this line, making sure to add the whitespace before
the -o:
-o content_filter=spamfilter:

Under the Interfaces to non-Postfix software section CREATE the following two
lines, making sure to add the whitespace before the flags:
spamfilter unix - n n - - pipe
flags=Rq user=spamfilter argv=/usr/bin/postfixfilter -f ${sender} -- ${recipient}
Use "postfix reload" to make Postfix use the changes. Send a test spam message
to yourself from an outside source and verify that its working.