linux howto - fabio de lorenzo personal informations and experiences Forum Index linux howto - fabio de lorenzo personal informations and experiences
kernel modules and software
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SPAMASSASSIN INSTALL (EASY)

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    linux howto - fabio de lorenzo personal informations and experiences Forum Index -> postfix
View previous topic :: View next topic  
Author Message
root
Site Admin


Joined: 27 Apr 2004
Posts: 156

PostPosted: Wed May 24, 2006 11:46 pm    Post subject: SPAMASSASSIN INSTALL (EASY) Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    linux howto - fabio de lorenzo personal informations and experiences Forum Index -> postfix All times are GMT
Page 1 of 1

 
Jump to:  
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