I use the following to extract the envelope sender et al.:
# Catch SMTP Envelope Sender
# and write it into X-$HOSTNAME-Fromenvelope header
:0fh
{
SUBJECT="`/usr/bin/formail -xSubject:`"
FROM="`/usr/bin/formail -XFrom | head -1`"
SENDER="`/bin/echo $FROM | cut -d' ' -f2`"
FULLSENDER='<'"$SENDER"'>'
:0fh
|/usr/bin/formail -f -i "X-${HOST}-Envelope-From: ${SENDER}"
}
Hope this helps,
wolfgang
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail