procmail
[Top] [All Lists]

Re: Matching literal dot in To

2015-06-14 07:34:26
On Sun, Jun 14, 2015 at 07:38:30PM +1000, Erik Christiansen wrote:
We need another tweak. This will be a great deal closer:

   * ^TO_.*\<[^.@ ]+\.[^.@ ]+@

That will not leap to the end of a mismatched address, but slide off it
in stages, because '\<' is only shorthand for `[^a-zA-Z0-9_]'. But we
needn't fuss over a lost microsecond here or there. It should do the job
now.

That will miss an address like abc(_dot_)def+ghi(_at_)example(_dot_)com.  
Better to do
away with the '\<' entirely.  But there could still be problems if there
happened to be both a '.' and an '@' in the name part (the part that
isn't a part of the address, often, but not always, in quotes).  It may
be necessary to split this into two separate recipes, one that looks
at addresses with separate names, where the address is surrounded by
angle brackets <like this>, and one that looks at addresses standing
by themselves, which usually don't have the angle brackets, but are
delimited by commas, since I think it may be hard to look at both in
the same recipe without also looking at names that aren't part of an
address, and shouldn't be considered, although they might otherwise
match.

-- 
This address uses a whitelist.  If you aren't in my whitelist, you can
only send me e-mail if you send to an appropriately tagged address (it
includes +sometag between the username and @).  Finger my untagged e-mail
address for a tag guaranteed good for 24 hours if you're unsure.  If I've
sent you mail recently, you're temporarily whitelisted automatically.
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>