procmail
[Top] [All Lists]

Re: Matching literal dot in To

2015-06-12 18:54:58


On 06/12/2015 06:06 PM, Alan Clifford wrote:
Moby wrote to procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de
[at 16:02 (-0500) on Friday, 12th June, 2015]:



On 06/11/2015 11:27 PM, Bart Schaefer wrote:
On Thu, Jun 11, 2015 at 9:00 PM, Moby <moby(_at_)mobsternet(_dot_)com> wrote:
I use the following to match a literal dot in the To field, the dot (period)
has to occur prior to the @ character.  The recipe is:

"^To:.*\..*@.*"
Could you post the entire actual recipe, please?  And the relevant
fragment of log file, since you have it.
____________________________________________________________

Thanks Bart.  The recipe is:
:0w
* ^To:.*\..*@.*
| $DELIVERTO -a $CYUSER -m "jdotrejects" $CYUSER

The log snippet is:
procmail: Match on "^To:.*\..*@.*"

Here are header snippets from the particular email:

From: "GameStop PowerUp Rewards" <GameStop(_at_)e(_dot_)gamestop(_dot_)com>
To: "gamestop(_at_)abc-def(_dot_)com" <gamestop(_at_)abc-def(_dot_)com>

(abc-def.com is made up)




I see that as

^To: matches To:
.* matches "gamestop@abc-def
\. matches .
.* matches com" <gamestop
@ matches @


Alan

(  Please address personal email to alan+1@ as email to lists@
   is only read from my subscribed lists. )
Many thanks. I see the issue now - but cannot think of an easy fix short of sending the message to an external script for processing. Would you have any ideas on how to handle situations like this? I now realize I would also need to handle the case where the To: line has multiple recipients, I would need to check ~each~ email address as to whether it has a dot in it or not.

Regards and many thanks,

--
--Moby

They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety.  -- Benjamin Franklin

____________________________________________________________
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