Add "Received:" header to email msg in correct position?

Antoon Pardon antoon.pardon at rece.vub.ac.be
Wed May 7 04:57:51 EDT 2014


On 07-05-14 10:11, Emre Hasegeli wrote:
> Antoon Pardon <antoon.pardon at rece.vub.ac.be
> <mailto:antoon.pardon at rece.vub.ac.be>>:
>
>     > I'm working on a Python app that receives an e-mail message via
>     SMTP,
>     > does some trivial processing on it, and forwards it to another SMTP
>     > server.
>     >
>     > I'd like to do the polite thing and add a "Received:" header, but I
>     > can't figure out how to get Python's email module to add it in the
>     > correct place.  It always ends up at the "bottom" of the headers
>     below
>     > From: To: etc.  It's supposed to go at the above all the Received:
>     > headers that where there when I received it.
>
>     I thought that was the job of the SMTP servers, not of email
>     applications. So I'm not sure
>     that what you want to do is the polite thing to do.
>
>
> This application seems like an SMTP server.
>
It doesn't to me. As far as I can see what he wants to do can be done
by a mail program like procmail in combination with some mail
filtering/processing.

-- 
Antoon Pardon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140507/25dde7d2/attachment.html>


More information about the Python-list mailing list