parse postfix stream

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I would like to use the postfix-command

test   unix   -   n   n   -   1   pipe
       flags=R user=test argv=/usr/bin/ -d -n $User

to send an e-mail to an file. Now i have to parse the mail with perl.
has anyone an example, how to read (from stdin) and parse the e-mail. I
was searching by google, but nothing fits.

Best regards


Re: parse postfix stream

Quoted text here. Click to load it

In the subject you wrote that you need to parse the postfix stream. Here
you write that you need to parse the mail. What is it?

For parsing mail I'd suggest MIME::Parser. It's a bit heavyweight, but
reliable and does just about everything you might need.

Parsing a postfix stream is a different matter. I don't know any perl
module which does this and no documentation of the stream format.
However, you might want to have a look at the Postfix support in qpsmtpd
- it creates such a stream instead of parsing it.


Site Timeline