[prev in list] [next in list] [prev in thread] [next in thread]
List: procmail
Subject: Re: matching addr in msg body for formail
From: deb <domo () tickleme ! llnl ! gov>
Date: 2003-11-14 22:43:49
[Download RAW message or body]
Hello,
Okay, I'm stumped. Here's my recipe, borrowed in very
large part from Ruud's recipe, but please, if anyone can help,
I'd appreciate it.
What follows is the recipe, message body to match, and then the log.
I am unable to get the 2nd match on the line "requests" in order to get
$List and $Subscriber assigned.
My head is getting flatter by the minute as I beat it on my desk...
deb
RECIPE:
:0 c
* ^From:.*majordomo@lists.com
* !^X-Loop: elists-approval@lists.com
* B ?? ^^--$$.*<\/[^>]+> requests that you approve the following:\
$$[ ]+unsubscribe .*
{
M = "$MATCH"
:0
* M ?? ^^\/[^>]+
{ ReqAddr="$MATCH" }
:0
* M ?? ^^[^>]+> requests that you approve the following:\
$$[ ]+unsubscribe \/.*
{ M = "$MATCH" }
:0
* M ?? ^^\/[^ ]+
{ List = "$MATCH" }
:0
* M ?? ^^[^ ]+ \/[^ ]+
{ Subscriber = "$MATCH" }
:0
| (formail -r -I"From: MajorDomo-Owner@lists.com" \
-I"To: $ReqAddr" \
-A"X-Loop: elists-approval@lists.com" ; \
cat $AUTORESPONSE ) | $SENDMAIL -t
}
##################################################################
MESSAGE BODY:
--
Deb <deb@lists.com> requests that you approve the following:
unsubscribe elists someone@example.com
If you approve, please send a message such as the following back to
majordomo@lists.com (with the appropriate PASSWORD filled in, of course):
approve PASSWORD \
unsubscribe elists \
someone@example.com
[The above is broken into multiple lines to avoid mail reader linewrap
problems. Commands can be on one line, or multi-line with '\' escapes.]
If you disapprove, do nothing.
Thanks!
majordomo@lists.com
##################################################################
The 2nd match on the line containing "requests" fails.
Here's the log:
procmail: [1003] Fri Nov 14 14:33:34 2003
procmail: Assigning "LOGABSTRACT=ALL"
procmail: Assigning "DEFAULT=/dev/null"
procmail: Assigning "ORGMAIL=/dev/null"
procmail: Assigning "SENDMAIL=/home/deb/.procmail/sandbox/sendmail.sh"
procmail: Assigning "AUTOREPLY=/home/deb/.procmail/AutoResponses"
procmail: Assigning "MATCH="
procmail: Matched "APPROVE elists"
procmail: Match on "^Subject:[ ]*\/[^ ].*"
procmail: Assigning "SUBJECT=APPROVE elists"
procmail: Assigning "MATCH="
procmail: Matched "elists-approval@lists.com"
procmail: Match on "^To:[ ]*\/[^ ].*"
procmail: Assigning "TO=elists-approval@lists.com"
procmail: Assigning "MATCH="
procmail: Matched "majordomo@lists.com"
procmail: Match on "^From:[ ]*\/[^ ].*"
procmail: Assigning "FROM=majordomo@lists.com"
procmail: No match on "^X-Envelope-To: *<\/[^>]*"
procmail: Assigning "MATCH="
procmail: Matched "MajorDomo-Owner@lists.com"
procmail: Match on "^From \/[^ ]*"
procmail: Assigning "ENVFROM=MajorDomo-Owner@lists.com"
procmail: Assigning "SENDER="
procmail: Executing "formail,-b,-rtzxTo:"
procmail: Assigning "CLEANFROM="
procmail: Executing "formail,-IReply-To:,-rtzxTo:"
procmail: Assigning "MATCH="
procmail: Matched "majordomo"
procmail: Match on "^\/[^@]+"
procmail: Assigning "FROM_USER=majordomo"
procmail: Assigning "MATCH="
procmail: Matched "lists.com"
procmail: Match on "@\/.*"
procmail: Assigning "FROM_DOMAIN=lists.com"
procmail: Assigning "INCLUDERC=test_filter.rc"
procmail: Match on "^From:.*majordomo@lists.com"
procmail: Match on ! "^X-Loop: elists-approval@lists.com"
procmail: Assigning "MATCH="
procmail: Matched "deb@lists.com> requests that you approve the following:
unsubscribe elists someone@example.com"
procmail: Match on "^^--$$.*<\/[^>]+> requests that you approve the following:$$[ ]un
subscribe .*"
procmail: Forking "procmail"
procmail: [1008] Fri Nov 14 14:33:34 2003
procmail: Assigning "M=deb@lists.com> requests that you approve the following:
unsubscribe elists someone@example.com"
procmail: Assigning "MATCH="
procmail: Matched "deb@lists.com"
procmail: Match on "^^\/[^>]+"
procmail: Assigning "ReqAddr=deb@lists.com"
procmail: No match on "^^[^>]+> requests that you approve the following:$[ ]+unsubscri
be \/.*"
procmail: Assigning "MATCH="
procmail: Matched "deb@lists.com>"
procmail: Match on "^^\/[^ ]+"
procmail: Assigning "List=deb@lists.com>"
procmail: Assigning "MATCH="
procmail: Matched "requests"
procmail: Match on "^^[^ ]+ \/[^ ]+"
procmail: Assigning "Subscriber=requests"
procmail: Assigning "LASTFOLDER=/dev/null"
procmail: Opening "/dev/null"
>From MajorDomo-Owner@lists.com Fri Nov 14 10:51:40 2003
procmail: Executing " (formail -r -I"From: MajorDomo-Owner@lists.com" \
-I"To: $ReqAddr" \
-A"X-Loop: elists-approval@lists.com" ; \
cat $AUTORESPONSE) | $SENDMAIL -t"
procmail: Assigning "LASTFOLDER= (formail -r -I"From: MajorDomo-Owner@lists.com" \
-I"To: $ReqAddr" \
-A"X-Loop: elists-approval@lists.com" ; \
cat $AUTORESPONSE) | $SENDMAIL -t"
>From MajorDomo-Owner@lists.com Fri Nov 14 10:51:40 2003
Subject: APPROVE elists
Folder: (formail -r -I"From: MajorDomo-Owner@lists.com" \ -I" 1616
Subject: APPROVE elists
Folder: /dev/null 1616
_______________________________________________
procmail mailing list
procmail@lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic