On 28 Feb 2002 at 16:44, Greg Ward wrote:

> [I suggest a new rule]
> > Here's a quick and dirty attempt:
> > 
> > header TO_REALNAME_EQ_LOCALPART    To =~ /\"?(\w+)\"?\s+<\1\@[^<>]+>/i
> > describe TO_REALNAME_EQ_LOCALPART  Real name in "To:" equals local part
> > score TO_REALNAME_EQ_LOCALPART     2.5
> 
> [Craig responds]
> > Sounds like a good rule -- even people like me who use their name as email
> > address probably won't have many people using "Craig"
> > <[EMAIL PROTECTED]>; if they're going to go to the trouble of setting
> > the real name, they'll now what my last name is.
> 
> OK, what next?  Is that regex good enough?  I doubt it -- I cobbled it
> together off-the-top-of-my-head, and consulted only the copy of RFC 822
> which I carry around in my brain (not entirely infallible).  Do you want
> me to take a crack at honing the rule, so eg. something more appropriate
> than \w+ is used, or so it doesn't match when there are mismatched
> quotes?  Or do you want to take over from here?
> 
> I'm not really clear on how strict SA's regexes should be -- ie. is the
> goal to follow the grammar in the RFC, or to just do a good enough job
> that most spam is caught?

One caveat.

E-mail of the form [ "Your Name" <[EMAIL PROTECTED]> ] is legal.

E-mail of the form [ [EMAIL PROTECTED] (Your Name) ] is also legal.

Not knowing much about regexp, I'm not sure if your proposed 
expression handles the second case.
----
Nels Lindquist <*>
Information Systems Manager
Morningstar Air Express Inc.


_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to