Slightly OT: Why isn't this regex working in local.cf for my server?

Christopher Fisk cfisk at qwicnet.com
Mon Mar 29 15:36:22 IST 2010


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.



More information about the MailScanner mailing list