http://forums.sentora.io/showthread.php?tid=22
Ubuntu :How to setup Spamassassin
Ubuntu :How to setup Spamassassin
How to setup Spamassassin
1: Use apt-get to install Spamassassin and spamc.
Add Spamassassin user
2: First add the group spams:
3: Then add the user spamd with the home irectory /var/log/spamassassin:
4: then create the directory /var/log/spamassassin and change the ownership:
Setting Up Spamassassin
5: Open the spamassassin config file using:
6: Setting up spamassassin
save and exit
7: Now create a variable named SAHOME with the Spamassassin home directory:
8: start spamassassin
Configuring Postfix
9: Open Postfix config file using:
10: Find the the line
11 End of the file add:
12: restart postfix
Configuring Spamassassin
13: Open the Spamassassin default rules file using:
14 : make rules
15: now restart spamassassin
1: Use apt-get to install Spamassassin and spamc.
Code: (Select All)
apt-get install spamassassin spamc2: First add the group spams:
Code: (Select All)
groupadd spamd3: Then add the user spamd with the home irectory /var/log/spamassassin:
Code: (Select All)
useradd -g spamd -s /bin/false -d /var/log/spamassassin spamd4: then create the directory /var/log/spamassassin and change the ownership:
Code: (Select All)
mkdir /var/log/spamassassin
chown spamd:spamd /var/log/spamassassinSetting Up Spamassassin
5: Open the spamassassin config file using:
Code: (Select All)
nano /etc/default/spamassassin6: Setting up spamassassin
Code: (Select All)
Find ENABLED=0 and change to ENABLED=1
Find CRON=0 and change to CRON=1
Find OPTIONS and change the line to
OPTIONS="--create-prefs --max-children 2 --username spamd \ -H ${SAHOME} -s ${SAHOME}spamd.log"7: Now create a variable named SAHOME with the Spamassassin home directory:
Code: (Select All)
SAHOME="/var/log/spamassassin/"8: start spamassassin
Code: (Select All)
service spamassassin startConfiguring Postfix
9: Open Postfix config file using:
Code: (Select All)
nano /etc/postfix/master.cf10: Find the the line
Code: (Select All)
smtp inet n - - - - smtpd
add "-o content_filter=spamassassin" after smtpd11 End of the file add:
Code: (Select All)
spamassassin unix - n n - - pipe user=spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}12: restart postfix
Code: (Select All)
service postfix restartConfiguring Spamassassin
13: Open the Spamassassin default rules file using:
Code: (Select All)
nano /etc/spamassassin/local.cf14 : make rules
Code: (Select All)
change
Subject ***** SPAM ***** to
rewrite_header Subject [*** SPAM ***]
change required_score 5.0 to required_score 3.0
use_bayes from 0 to 1
bayes_auto_learn from 0 to 115: now restart spamassassin
Code: (Select All)
service spamassassin restart
No comments:
Post a Comment