SpamAssassin

De Wiki NCad
Révision de 10 septembre 2012 à 10:45 par Cacheln (discuter | contributions) (Configuration de /etc/postfix/master.cf)

Aller à : navigation, rechercher

Installation

Ubuntu

Configuration de /etc/default/spamassassin

Pour que le service puisse être lancé :

  • Modifier :
ENABLED=1
  • Par :
ENABLED=0

Configuration de /etc/spamassassin/local.cf

Renseigner le fichier comme tel :

rewrite_header Subject [***** SPAM _SCORE_ *****]
required_score           2.0
#to be able to use _SCORE_ we need report_safe set to 0
#If this option is set to 0, incoming spam is only modified by adding some "X-Spam-" headers and no changes will be made to the body.
report_safe     0

# Enable the Bayes system
use_bayes               1
use_bayes_rules         1
# Enable Bayes auto-learning
bayes_auto_learn        1

# Enable or disable network checks
skip_rbl_checks         0
use_razor2              0
use_dcc                 0
use_pyzor               0

Intégration pour Postfix

Configuration de /etc/postfix/master.cf

  • En début de fichier, modifier :
smtp      inet  n       -       -       -       -       smtpd
  • Par :
smtp      inet  n       -       -       -       -       smtpd
       -o content_filter=spamassassin
  • En fin de fichier ajouter :
spamassassin unix -     n       n       -       -       pipe
       user=spamd argv=/usr/bin/spamc -f -e
       /usr/sbin/sendmail -oi -f ${sender} ${recipient}