informatique:reseau:messagerie:postfix:body_header_checks

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
informatique:reseau:messagerie:postfix:body_header_checks [2010/03/08 13:41] – Reprise ancien Wiki nicoinformatique:reseau:messagerie:postfix:body_header_checks [2012/02/03 14:32] (Version actuelle) bn8
Ligne 1: Ligne 1:
 +====== Body & Header Checks ======
 +
 +** Filtrage personnalisé avec Postfix**
 +
 +Il est possible d'intégrer de l'antispam directement das postfix sans faire appel à SpamAssassin ou alors pour lui venir en aide. Pour cela on utilise les options body_check et header_check pour analyser les en-tête et corps des mails à la rechercher de chaines ou d'expressions interdites.
 +
 +**Header Check**
 +
 +__Dans le main.cf on rajoute la ligne suivante :__
 +
 +  header_checks = regexp:/etc/postfix/header_check.cf
 +
 +__Puis on remplis notre fichier header_check.cf avec ce genre de règles :__
 +
 +  /^Subject: .*V?AGRA/    REJECT Spam
 +  /^Subject: .*V??AGRA/   REJECT Spam
 +  /^Subject: .*casino/    REJECT Spam
 +  /^Subject: .*Casino/    REJECT Spam
 +  /^Subject: .*climaxes/  REJECT Spam
 +  /^Subject: .*erection/  REJECT Spam
 +  /^Subject: .*partouche/ REJECT Spam
 +  /^From: .*Casino/       REJECT Spam
 +  /^From: .*casino/       REJECT Spam
 +  /^From: .*gambling/     REJECT Spam
 +  /^From: .*king/         REJECT Spam
 + 
 +
 **Body Check** **Body Check**
  
-Dans le main.cf on rajoute la ligne suivante :+__Dans le main.cf on rajoute la ligne suivante :__ 
 + 
 +  body_checks = regexp:/etc/postfix/body_check 
 + 
 +On récupère la blacklist sur : http://www.malware.com.br/cgi/submit?action=list_postfix puis on renomme le fichier teéléchargé en body_check
  
-''header_checks = regexp:/etc/postfix/header_check.cf''+On transforme le fichier base de données lisible par postfix :
  
 +  postmap body_check
  
-''/^Subject: .*V?AGRA/    REJECT Spam +Un fichier body_check.db est créé
-/^Subject: .*V??AGRA/   REJECT Spam +
-/^Subject: .*casino/    REJECT Spam +
-/^Subject: .*Casino/    REJECT Spam +
-/^Subject: .*climaxes/  REJECT Spam +
-/^Subject: .*erection/  REJECT Spam +
-/^Subject: .*partouche/ REJECT Spam +
-/^From: .*Casino/       REJECT Spam +
-/^From: .*casino/       REJECT Spam +
-/^From: .*gambling/     REJECT Spam +
-/^From: .*king/         REJECT Spam''+
  
  • informatique/reseau/messagerie/postfix/body_header_checks.1268055686.txt.gz
  • Dernière modification : 2011/06/21 12:48
  • (modification externe)