 |
linux howto - fabio de lorenzo personal informations and experiences kernel modules and software
|
| View previous topic :: View next topic |
| Author |
Message |
root Site Admin
Joined: 27 Apr 2004 Posts: 156
|
Posted: Wed May 24, 2006 11:46 pm Post subject: 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.sh
5. Create a user called 'spamfilter'. Make it a complete user, with home directory and shell.
6. Run: chown spamfilter /usr/local/bin/spamfilter.sh
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. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|