Slightly OT: Why isn't this regex working in local.cf for my
server?
Eric Mink
e.mink at remote.nl
Mon Mar 29 15:54:17 IST 2010
Maybe this link will help you out :
http://home.comcast.net/~mkettler/sa/SA-rules-howto.txt
-----Oorspronkelijk bericht-----
Van: mailscanner-bounces at lists.mailscanner.info
[mailto:mailscanner-bounces at lists.mailscanner.info] Namens Christopher
Fisk
Verzonden: maandag 29 maart 2010 16:36
Aan: mailscanner at lists.mailscanner.info
Onderwerp: Slightly OT: Why isn't this regex working in local.cf for my
server?
First: I *know* something similar has been asked, but I just can not
find it in the archives and have been searching over an hour, so I have
given up. I think my search skills are rusty.
header LOCAL_AUTH_RCVD_QN Received =~ Authenticated sender:
[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\) by mailserver\.mydomain\.tld
score LOCAL_AUTH_RCVD_QN -100
describe LOCAL_AUTH_RCVD_QN Whitelist for Authenticated users
The header I am matching on is as follows:
Received : from MYSERV (unknown [###.###.###.###]) (Authenticated
sender: user at domain.tld) by mailserver.mydomain.tld (Postfix) with
ESMTPA id CED3719C1DB for <user at domain.tld>; Mon, 29 Mar 2010 10:22:09
-0400 (EDT)
I assumed that I could match on just the middle part that won't really
change except for the email address:
"Authenticated sender: user at domain.tld) by mailserver.mydomain.tld"
I found the regex [A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4} on
http://www.regular-expressions.info saying it would match 99% of email
addresses.
Is it possible I am not loading local.cf? It is in
/etc/mail/spamassassin/local.cf Other cf files in that directory are
loaded as far as I can tell. I think that this is just me not
understanding how to do a proper regex.
Am I missing a wildcard before and after my string?
Thank you very much!
Christopher Fisk
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner
Before posting, read http://wiki.mailscanner.info/posting
Support MailScanner development - buy the book off the website!
More information about the MailScanner
mailing list