Re: Matching literal dot in To

Chuck Martin <[email protected]> Sun, 14 Jun 2015 08:30:53 -0400
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
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 [email protected].  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.