Okan Demirmen wrote:
On Wed 2006.09.27 at 14:49 +1000, Christopher Martin wrote:
I am trying to use milter-regex to pre-sort e-mail/spam before passing
it on to clamav and spamassassin, but it doesn't seem to be working.
Here are my first, slightly lame, rules:
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/
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 help!
have you enabled the milter in sendmail? you can also watch syslog and
see exactly what milter-regex is doing.
It is enabled in sendmail, and as I had to resolve some permissions
issues to get rid of error messages I am now reasonably sure it's
running as it should.
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!