procmail
[Top] [All Lists]

Re: Odd behavior or incorrect recipe?

2002-04-18 20:28:28
At 21:15 2002-04-18 -0500, Mike Loiterman did say:

[snip]

Wow, 10 shelled processed, plus the necessary shells for them. Seems rather complicated for something so simple. Why not use procmail to do this?


:0
* ^Message-ID:[         ]*<?\/[^@<> ]+
{
        # from your example, I presume you want the brackets,
        # but didn't want anything following an at.
        MESSAGE_ID=<$MATCH>
}

:0
* ^X-Spam-Status:.*hits=\/[^ ]*
{
        SPAM_STATUS=$MATCH
}

# yup, this is your one and only shelled process - and if you were willing
# to extract this from your "from" line, you wouldn't even need to run date.
DATE=`date +"%m/%d/%y %H:%M"`

# I'm emitting to a log - you can redirect to a file if you want.
LOG="$DATE $SPAM_STATUS $MESSAGE_ID$NL"

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

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

<Prev in Thread] Current Thread [Next in Thread>