Deluxnetwork
English German French Italian Portuguese Spanish Chinese     
 
Penguin



Postfix & SpamAssassin Installation Guide. (by Xnote Communications)

POSTFIX AND SPAMASSASSIN INSTALL (EASY)

 

Please note: File locations are based on my own install. Yours may be different, and should be checked and appropriate changes made.

1. Install postfix and get it working for your domain. See http://www.postfix.org for details.

2. Install SpamAssassin. The easiest way to do this is with the command "perl -MCPAN -e 'install Mail::SpamAssassin'"  OR you can compile it. 

3. As root, create a file at /usr/local/bin/spamfilter.sh with the following content:
 

#!/bin/bash
/usr/local/bin/spamc | /usr/sbin/sendmail -i "$@"
exit $?

 

4. Run "chmod 755 /usr/local/bin/spamfilter"

5. Create a user called 'spamfilter'. Make it a complete user, with home directory and shell.

6. Run "chown spamfilter /usr/local/bin/spamfilter"

7. In /etc/postfix/master.cf in the "Services" section, alter the 'smtp' line as follows (the " -o con..." SHOULD be on the next line:  NOTE:  there are two lines that have smtp.  Make sure it is the inet line.  Usually the first line.
 

# -----------------------------------------------------------------------------------
smtp inet n - n - - smtpd
  -o content_filter=spamfilter:
# -----------------------------------------------------------------------------------

 

8. In /etc/postfix/master.cf in the "Interfaces to non-Postfix software" section add:
 

# -----------------------------------------------------------------------------------
spamfilter unix - n n - - pipe
  flags=Rq user=spamfilter argv=/usr/local/bin/spamfilter.sh -f ${sender} -- ${recipient}
# -----------------------------------------------------------------------------------

 

9. Restart postfix and make sure you can still get email. Send a fake spam through the system (from an outside address) to verify that spam is marked as spam. For information on configuring SpamAssassin, go to http://www.spamassassin.org.



Linux Hosting by www.d9x.net