Re: parse postfix stream



On 2008-07-30 06:41, Christian Vallant <christian.vallant@xxxxxxxxxxxx> wrote:
hello!

I would like to use the postfix-command

test unix - n n - 1 pipe
flags=R user=test argv=/usr/bin/test.pl -d -n ${user}

to send an e-mail to an file. Now i have to parse the mail with perl.

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.

hp
.