Re: Matching literal dot in To

Erik Christiansen <[email protected]> Sun, 14 Jun 2015 19:38:30 +1000
Newsgroups gmane.mail.procmail
Message-ID <20150614093830.GC3379@ratatosk>
On 13.06.15 18:21, Moby wrote:
> Thanks.
> 
> This seems to suffer from the same issue that my simplistic recipe
> suffered from.  Using the same email, here is the recipe I used
> together with the log snippet:
> 
> To header from email:
> To: "[email protected]" <[email protected]>
> 
> Recipe:
> :0w
> * ^TO_.*\<[^.@]+\.[^.@]+@

Ah, yes, the unanticipated match is due to allowing a match across ' '.
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.

Erik

-- 
The Heineken Uncertainty Principle:
        You can never be sure how many beers you had last night.