procmail
[Top] [All Lists]

Re: Matching literal dot in To

2015-06-14 04:35:14
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: "gamestop(_at_)abc-def(_dot_)com" <gamestop(_at_)abc-def(_dot_)com>

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.
____________________________________________________________
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>