PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > comp.mail.sendmail > milter-regex config doesn't seem to work
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.mail.sendmail Configuring and using the BSD sendmail agent.

milter-regex config doesn't seem to work

Réponse
 
LinkBack Outils de la discussion
Vieux 26/09/2006, 05h12   #1
Chris Martin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut milter-regex config doesn't seem to work

I have recently taken over a spam elimination project at my work. We're
doing well, and so far has been very successful, but we are expecting a
lot of growth in the amount of mail hitting the filters, so I thought it
may be a good idea to pre-process a the mail and drop some of the more
common crap before letting spamassassin handle the rest.

Milter-regex seemed like a good solution, and I have mocked up the
following config file as a trial:

reject "Spam not welcome"
header /Subject:/ /\b(PHA)+([a-zA-Z]+(RMA))\b/

reject "Spam not welcome"
header /Subject:/ /\b(PHA)+([a-zA-Z]+(RMACY))\b/

discard
header /Subject:/ /TESTSTRING45819203/

# reject "Spam not welcom"
# body ^\S(ubject\:|UBJECT\ \b(PHA)+([a-zA-Z]+(RMACY))\b

# reject "Spam not welcom"
# body ^\S(ubject\:|UBJECT\ \b(PHA)+([a-zA-Z]+(RMA))\b

I have tried sending mails with the test string (TESTSTRING45819203) but
they get through. Are my rules wrong? I am very much a regex newbie, so
I suspect my rules are wrong, but I need someone's !

Thanks,

Chris
  Réponse avec citation
Vieux 28/09/2006, 00h04   #2
Chris Martin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: milter-regex config doesn't seem to work

Chris Martin wrote:
> I have recently taken over a spam elimination project at my work. We're
> doing well, and so far has been very successful, but we are expecting a
> lot of growth in the amount of mail hitting the filters, so I thought it
> may be a good idea to pre-process a the mail and drop some of the more
> common crap before letting spamassassin handle the rest.
>
> Milter-regex seemed like a good solution, and I have mocked up the
> following config file as a trial:
>
> reject "Spam not welcome"
> header /Subject:/ /\b(PHA)+([a-zA-Z]+(RMA))\b/
>
> reject "Spam not welcome"
> header /Subject:/ /\b(PHA)+([a-zA-Z]+(RMACY))\b/
>
> discard
> header /Subject:/ /TESTSTRING45819203/
>
> # reject "Spam not welcom"
> # body ^\S(ubject\:|UBJECT\ \b(PHA)+([a-zA-Z]+(RMACY))\b
>
> # reject "Spam not welcom"
> # body ^\S(ubject\:|UBJECT\ \b(PHA)+([a-zA-Z]+(RMA))\b
>
> I have tried sending mails with the test string (TESTSTRING45819203) but
> they get through. Are my rules wrong? I am very much a regex newbie, so
> I suspect my rules are wrong, but I need someone's !
>
> Thanks,
>
> Chris


I ran the milter with the "-d" option, and it started passing mails
through the milter, but none got picked up. I then trimmed the colon
from the Subject entries, and all was well!

Here is my basic ruleset:

reject "Spam not welcome"
header /Subject/ /\b(PHA)+([a-zA-Z]+(RMA))\b/

reject "Spam not welcome"
header /Subject/ /\b(PHA)+([a-zA-Z]+(RMACY))\b/

reject "Testing: it works!"
header /Subject/ /TESTSTRING45819203/

Debug option saves the day!
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h50.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12125 seconds with 10 queries