Try Experimental 1.0pre7
- From:
- Zed A. Shaw
- Date:
- 2009-10-07 @ 16:53
Hi everyone,
It turns out that Python's email module is full of lies. For those of
you who have had problems with envelope header being wrong, that's
because nearly every part of Python's email library gets it wrong. I
was operating under the assumption that it could at least get that
right, but nope.
Some of the highlights are:
* The get_unixfrom and set_unixfrom operate on the *entire string*. If
you want to set the envelope header, you have to format it yourself.
* If you set the From in the message, and then call str(msg), Python
will generate the envelope header, but not From who you said, from
*nobody*.
* When you send an email, even though you give the envelope header
information in the SMTP.sendmail() call, it doesn't generate an
envelope header.
The end result of this is that Lamson will need to completely
manufacture it's own envelope headers and probably have asserts to
prevent you from accidentally trying to send without one.
For now though, I have a 1.0pre7 release up that just removes the
envelope headers. I'd like people to try it and make sure at least that
works. It works on librelist through postfix, but I'm betting it'll
have problems with other mail servers.
You can get it this way:
easy_install -U http://lamsonproject.org/releases/lamson-1.0pre7.tar.gz
And report if it barfs against your mail server or with your code.
--
Zed A. Shaw
http://zedshaw.com/