procmail
[Top] [All Lists]

Re: Replacing characters in $MATCH, and folders with periods

2004-04-09 03:45:07
On Fri, Apr 09, 2004 at 12:10:25AM -0500, Timur Tabi wrote:
I have the following recipe:

:0
* ^TO_ \/(_dot_)*(_at_)subdomain\(_dot_)domain\(_dot_)com
* MATCH ?? ()\/[^(_at_)]+
.$MATCH/

Combine that with another filter on my ISP's mail server, and whenever
someone sends email to xxx(_at_)subdomain(_dot_)domain(_dot_)com, it gets 
dumped into
mail folder xxx.

The problem occurs when xxx contains a period.  Then procmail interprets
the period in $MATCH as a folder delimiter.  So if I send email to
amazon(_dot_)com(_at_)subdomain(_dot_)domain(_dot_)com, it creates a folder 
called "amazon",
another folder called "com" underneath "amazon", and puts the email in
"com".

Instead I want it to create a folder called amazon.com and put the email
in there.  How do I do that?

The following is untested, but I would try quoting the match token
and seeing if that doesn't solve it.  The action line would then
be this, instead:

   .$\MATCH/

-- 
dman

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail