procmail
[Top] [All Lists]

Re: Processing The Body vs. The Headers

2002-03-22 00:04:42
SoloCDM <deedsmis(_at_)aculink(_dot_)net> writes:
Hopefully, without providing the data, this condition (borrowed
from an example) is what I used to process the headers:

* ? formail -x'From:' -x'From' -x'Sender:' -x'Reply-To:' -x'To:'
-x'Received:' -x'Message-Id:' -x'Content-Type:' | egrep -is -f
${PMDIR}black.lst

If I have a line in the body that I wanted to process, what would
I use as a condition that would pipe the information to egrep
statements?  I tried "formail -I '' | egrep '<pattern>' | egrep
'<pattern>'" and "formail -I '' -ds | egrep '<pattern>' | egrep
'<pattern>'", but they didn't seem to work.

The "var ??" condition special works with '?' conditions, controlling
what procmail feeds into the invoked command, so:

        :0
        * B ?? ? egrep '<pattern>' | egrep '<pattern2>'
        whatever...


Philip Guenther
_______________________________________________
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>
  • Re: Processing The Body vs. The Headers, Philip Guenther <=