Ero sivun ”Spamassassin/en” versioiden välillä
(Ak: Uusi sivu: and below the line add:) |
(Ak: Uusi sivu: The end result:) |
||
Rivi 51: | Rivi 51: | ||
-o content_filter=spamassassin | -o content_filter=spamassassin | ||
− | + | The end result: | |
smtp inet n - - - - smtpd | smtp inet n - - - - smtpd |
Versio 30. kesäkuuta 2015 kello 08.33
Spamassassin is an effective way to block junk mail in Postfix. Spamassassin requires Postfix to be installed before you can install Spamassassin.
Spamassassin marks junk mail with a "*****SPAM*****" notification in the e-mail topic line.
Sisällysluettelo
Installation
Install Spamassassin with aptitude
aptitude install spamassassin
Configuration
We create a user for the Spamassassin program.
adduser spamd --disabled-login
Open file:
/etc/default/spamassassin
We enable Spamassassin by changing the ENABLED parameter from 0 to 1
ENABLED=1
We have to configure home- and settings parameters.
SPAMD_HOME="/home/spamd/" OPTIONS="--create-prefs --max-children 5 --username spamd --helper-home-dir ${SPAMD_HOME} -s ${SPAMD_HOME}spamd.log"
We must use a certain type of PID_FILE parameter:
PIDFILE="${SPAMD_HOME}spamd.pid"
We want Spamassassin rules and settings to update automatically:
CRON=1
The entire Spamassassin config file can be found here: https://www.dropbox.com/s/ndvpgc2jipdd4bk/etc.default.spamassassin.txt
Open the Postfix konfiguration file
nano /etc/postfix/master.conf
Find the line
smtp inet n - - - - smtpd
and below the line add:
-o content_filter=spamassassin
The end result:
smtp inet n - - - - smtpd -o content_filter=spamassassin
Lisää tämä tiedoston loppuun.
spamassassin unix - n n - - pipe user=spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
Käynnistä lopuksi palvelut uudelleen
service postfix restart
service spamassassin restart
Testaus
Lähetä alla oleva teksti sähköpostipalvelimellesi
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
Saapuessa tuloso olla otsikossa *****SPAM***** alku.