Sophos Puremessage Policy Rules affinée

Posted on février 1st, 2007 by Océane.
Categories: Puremessage Unix.

La politique de filtrage antispam (AntiSpam Policy Rules) de Sophos Puremesssage Unix qui suit permet :

- Suppression les messages ou mails qui ont un taux de probabilité supérieur à 85% que ce soit du spam
- Mise en quarantaine des mails qui ont un taux de spam compris entre 50% et 85%
- Mise en quarantaine, tag et envoie des mails qui ont un taux de spam compris entre 40% et 50%
- On laisse passer tous les messages qui ont un taux de probabilité inférieur à 40%

Bon tuning de puremessage ;-)



# ########## Antispam Rules #############
# Lorsque le Spam atteint le score de 85% on discard le mail
# attr NAME=AntiSpam Rules - Spam over than 85 % - Action : discard mail.
if not pmx_spam_prob :under 85 {
pmx_mark1 "Spam-With-SpamProb-Over-Than-85";
discard;
stop;
}
# Lorsque le Spam est compris entre 50 et 85 on le met en quarantaine
# attr NAME=AntiSpam Rules - Spam ranking between 50% and 85%. - Action : Quarantine, Stop.
if allof(pmx_spam_prob :over 49,
pmx_spam_prob :under 85)
{
pmx_mark1 "Spam-With-SpamProb-Over-Than-50";
pmx_add_header "X-PMX-Spam" "Probability=%%PROB%%";
pmx_quarantine "Spam";
stop;
}
# Lorsque le Spam est compris entre 40 et 50 on TAG le sujet
# attr NAME=AntiSpam Rules - Spam ranking between 40% and 50%. - Action : Copie to quarantine, Subject Notification, Keep.
if allof(pmx_spam_prob :under 49,
pmx_spam_prob :over 40)
{
pmx_mark1 "Spam-With-SpamProb-Over-Than-40";
pmx_replace_header :index 0 "Subject" "[Suspected Spam with prob = %%PROB%%] : %%SUBJECT%%";
pmx_file "Spam";
keep;
}
# Lorsque le Spam est compris en dessous de 40 nous laissons passer
# attr NAME=AntiSpam Rules - Spam under 40% - Action : Keep message
if not pmx_spam_prob :over 40 {
pmx_mark1 "Spam-With-SpamProb-under-40";
keep;
stop;
}
# attr NAME=Add X-Header and deliver messages
else {
pmx_replace_header :index 0 "X-PerlMx-Spam" "Gauge=%%XGAUGE%%%%IGAUGE%%, Probability=%%PROB%%, Report='%%HITS%%'";
stop;
}
}

0 comments.

Leave a comment

Comments can contain some xhtml. Names and emails are required (emails aren't displayed), url's are optional.