Greetings all. I'm having some trouble with my munging recipe. A list
member helped me fix the regex to match userids at my domain and munge
them. I'm trying to extract the header with formmail -X "" (found that in
a FAQ somewhere) and include it in the message after a block of generic
text. Unfortunately the best luck I've had to so far is (this is sad)
when I made a typo.
# This is Sean's
:0
* ^Subject:[ ]*\/[^ ].*
{
SUBJECT=$MATCH
}
:0 c
* $ ! ^X-Spam-Loop: $BOUNCER
{
:0f
| sed -e
"s/\<[-+_a-zA-Z0-9]*(_at_)[-_a-zA-Z0-9\(_dot_)]*sktc\(_dot_)net/MUNGED(_at_)sktc(_dot_)net/gi"
| \
formail -I ReSent \
-I X-Envelope-To:
:0 fhw r
| sed -e H -e '$ G'
:0f
# * $ formail -X ""
# {
# HEADER=$MATCH
# }
| (cat $AUTOREPLY/$BOUNCEMSG - | \
$FORMAIL-rt; formail -I "Subject: [email] $SUBJECT" \
-I "To: macdaddy(_at_)sktc(_dot_)net" \
-I "X-Spam-Loop: $BOUNCER" \
-A "From: $BOUNCER") | \
$SENDMAIL -t -f $BOUNCER
:0:
munged
}
To be honest I'm not sure what the 2nd sed line is doing in there or why I
commented out the formail -X lines. I did this late last night. :( I
pulled the sed line either out of a FAG, tips page, or mailing list
archive. The typo was not having a space between $FORMAIL and -rt. That
puts the header in the message like expected oddly enough. When I add the
missing space, the header is nolonger included.
The munging works just fine. It was late when I realized that I wasn't
including the headers from the munged messages in the forwarded text.
I'm going to use this recipe for auto-reporting to the FTC and NANAS.
Does anyone see any glaring mistakes? I can't for the life of my figure
out why the recipe is working in its current form. The original thread
can be found here
http://www.rosat.mpe-garching.mpg.de/mailing-lists/procmail/2002-04/msg00154.html
Thanks
Justin
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail