email auto-responder

Clemens Hermann haribeau at
Mon Aug 5 09:54:55 CEST 2002

Hi Gerhard,

> You could patch getmail to add the envelope FROM as an additional X-header, > for example X-Envelope-FROM.

but the Envelope is gone when the mail gets delivered into my ISPs mailbox.
So the only thing is to scan for Delivered-TO.

> You'll want the email module in Python 2.2+ to add the additonal header line.
> Alternatively, you could use the rfc822 module directly. Or do "the simplest
> thing that could possibly work", which is to just do something like:
>     old_mail = ...
>     envelope_from = ...
>     new_mail = "%s\n%s" % ("X-Envelope-From: " + envelope_from, old_mail)

thanks for the hint. It'll probably also work with Delivered-TO.


More information about the Python-list mailing list