procmail
[Top] [All Lists]

Re: How to get the actual message?

2002-07-03 15:32:27

It was expressed to me offlist that "'B' doesn't seem to work". That would sort of depend upon what construct you're trying to achieve with the body data (no example of how it wasn't working was given). So, if the construct you're trying to use doesn't support it (condition lines certainly do though), you could refer to the formail manpage (which is how the SUBJECT was being grabbed):

       To extract the body from a message:
              formail -I ""
       or
              sed -e '1,/^$/ d'

Thus, within a procmail rc file:

BODY=|`formail -I ""`

Now it is in ANOTHER variable besides B, which can be manipulated, and even emitted to the log:

LOG="The body is ${BODY}$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>