On 26 Nov, Warrick FitzGerald wrote:
| Hi all,
|
| I have a recipe that looks like this:
|
| :0:
| * lists\.\/(_dot_)*(_dot_)wfitzgerald(_at_)crtman(_dot_)com
| * MATCH ?? ^^\/[^.]+
| MailingLists/$MATCH
|
| Which when a message is sent to
lists(_dot_)mylistname(_dot_)wfitzgerald(_at_)crtman(_dot_)com
| should drop the message into MailingLists/mylistname.
|
| This seems to work 99% of the time, but for some unknown reason when I
| subscribed to the netsaints list and used
| lists(_dot_)netsaints(_dot_)wfitzgerald(_at_)crtman(_dot_)com all my message
end up in the
| MailingLists/sourceforge folder.
|
| This uis what the header looks like :
|
| Return-Path: <netsaint-users-admin(_at_)lists(_dot_)sourceforge(_dot_)net>
| Delivered-To: wfitzgerald(_at_)crtman(_dot_)com
| Received: from sc8-sf-list2.sourceforge.net (lists.sourceforge.net
| [66.35.250.206])
| by mail.crtman.com (Postfix) with SMTP id 74A06AA6C1
| for <lists(_dot_)netsaint(_dot_)wfitzgerald(_at_)crtman(_dot_)com>;
Tue, 26 Nov 2002
| 04:28:26 -0500 (EST)
| [...]
It's that Received header. Although it's split over multiple lines,
it's one header and procmail flattens it out as one line for condition
matching purposes. You're condition is matching lists.sourceforge in
the first part of that header and wfitzgerald(_at_)crtman(_dot_)com at the end.
This is probably caused by the MATCH operator \/ which makes regular
expressions greedy on the right side. I didn't test it, but you'd
probably get the match you want without \/. Since you need it, a
possible fix is:
:0:
* lists\.\/[^(_dot_)]+\(_dot_)wfitzgerald(_at_)crtman(_dot_)com
* MATCH ?? ^^\/[^.]+
MailingLists/$MATCH
This will only work as long as the part between lists. and .wfitzgerald
has no dots.
--
Reply to list please, or append "8" to "procmail" in address if you must.
Spammers' unrelenting address harvesting forces me to this...reluctantly.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail