I've looked at emails I've been setting aside and have noticed that
there are 5 received from lines that my servers post.  The one I
probably want is posted first when the external SMTP server contacts my
relay.  After that, my server passes the message to amavis which
produces two Received from lines.  At this point, the message is passed
to my postfix mailhub.  Finally, the fifth Received from relates to the
hub delivering the message.  So I am assuming that I want the first of
these five received from lines and I am assuming that I don't care about
the rest of the received from lines considering that they might be
faked.

I am attaching my perl script that is responsible for extracting the
correct received from line from an mbox file.  Comments on how to
improve this script are welcome.

Attachment: spam_processor.pl
Description: Perl program

Reply via email to