procmail
[Top] [All Lists]

Re: Parsing UPS Notification Emails

2001-11-30 13:57:38
At 09:33 AM 11/30/2001, Chris Haupt wrote:
RECIPIENT="email of person to process"
COMPANY="ID"
:0
* ^Subject: UPS Ship Notification, 1ZXXXXXX
{
       :0 fhwc
        | /opt/bin/formail -A "X-ShipStatus: Redirected to $RECIPIENT
($COMPANY)
"

        :0 A
        ! $RECIPIENT
}

How can I route this to a perl file also which will do the
processing that I want.  I would like the perl file to get
the full message (headers and body) as well as the ID field.

Am I missing something, or isn't it just "|"; for example,

    ...
    :0Ac
    ! $RECIPIENT

    :0A: some-lockfile-if-needed
    | your-perl-script.pl
    ...

which is if you want the perl script in addition to the forward.
You need the lockfile if your perl script can't safely handle two
simultaneous mail deliveries to it by different processes.

HTH,
Stan

_______________________________________________
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>