1. Install spamassassin on the server
# yum install spamassassin -y
2. Install required perl CPAN modules
# perl -MCPAN -e shell
cpan> install Digest::SHA1
cpan> install HTML::Parser
cpan> Install option perl modules...
3. Edit spamassassin configuration in /etc/mail/spamassassin/local.cf .
# vim /etc/mail/spamassassin/local.cf
# Encapsulate spam in an attachment (0=no, 1=yes, 2=safe)
report_safe 0
# Enable the Bayes system
use_bayes 1
# Enable Bayes auto-learning
bayes_auto_learn 1
# Enable or disable network checks
skip_rbl_checks 0
use_razor2 1
use_dcc 1
use_pyzor 1
# Mail using languages used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_languages all
# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_locales all
4. Tell procmail to run spamc on everyone's mail. Add these to /etc/procmailrc :
DROPPRIVS=yes
:0fw
| /usr/bin/spamc
5. Restart spamassassin
# service spamassassin restart
# yum install spamassassin -y
2. Install required perl CPAN modules
# perl -MCPAN -e shell
cpan> install Digest::SHA1
cpan> install HTML::Parser
cpan> Install option perl modules...
3. Edit spamassassin configuration in /etc/mail/spamassassin/local.cf .
# vim /etc/mail/spamassassin/local.cf
# Encapsulate spam in an attachment (0=no, 1=yes, 2=safe)
report_safe 0
# Enable the Bayes system
use_bayes 1
# Enable Bayes auto-learning
bayes_auto_learn 1
# Enable or disable network checks
skip_rbl_checks 0
use_razor2 1
use_dcc 1
use_pyzor 1
# Mail using languages used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_languages all
# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_locales all
4. Tell procmail to run spamc on everyone's mail. Add these to /etc/procmailrc :
DROPPRIVS=yes
:0fw
| /usr/bin/spamc
5. Restart spamassassin
# service spamassassin restart
0 comments:
Post a Comment