Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Christian Vallant
July 30, 2008, 6:41 am
rate this thread
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.
has anyone an example, how to read (from stdin) and parse the e-mail. I
was searching by google, but nothing fits.
Re: parse postfix stream
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.