wiki/HowtoMail/SpamAssassin.md

53 lines
1.3 KiB
Markdown
Raw Normal View History

2016-12-29 11:25:39 +01:00
**Cette page a été importée automatiquement de notre ancien wiki mais n'a pas encore été révisée.**
## SpamAssassin
### Utilisation avec SpamPD
Il est courant d'utiliser SpamAssassin par l'intermédiaire d'Amavisd. Cependant si pour diverses raisons on ne veut pas s'emcombrer d'Amavisd, il est possible d'utiliser un proxy SMTP, Spam Proxy Daemon (SpamPD) qui sera appelé par Postfix comme « content-filter ».
#### Installation
~~~
2017-01-14 00:06:38 +01:00
# aptitude install spampd
2016-12-29 11:25:39 +01:00
~~~
#### Configuration de SpamPD
Fichier _/etc/default/spampd_ :
2017-01-14 00:06:38 +01:00
2016-12-29 11:25:39 +01:00
~~~
STARTSPAMPD=1
~~~
La configuration de SpamAssassin sera utilisé, mais on peut surcharger celle-ci en spécifiant un fichier de conf spécifique à SpamPD :
2017-01-14 00:06:38 +01:00
2016-12-29 11:25:39 +01:00
~~~
ADDOPTS="--config=/etc/spampd.conf"
~~~
#### Intégration avec Postfix
Fichier _/etc/postfix/main.cf_ :
2017-01-14 00:06:38 +01:00
2016-12-29 11:25:39 +01:00
~~~
content_filter =scan:[127.0.0.1]:10025
~~~
Fichier _/etc/postfix/master.cf_ :
2017-01-14 00:06:38 +01:00
2016-12-29 11:25:39 +01:00
~~~
scan unix - - y - 10 smtp
localhost:10026 inet n - y - 10 smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o myhostname=filter.mynetwork.local
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
~~~