[Pymilter] something odd I've noticed about the milter supplied wrapper to e-mail module
Eric S. Johansson
esj at harvee.org
Wed Apr 21 21:50:40 EDT 2004
Stuart D. Gathman wrote:
> On Wed, 21 Apr 2004, Eric S. Johansson wrote:
> If there was a simple way to retrieve the value just stored, we could
> pass that on to sendmail instead. Unfortunately, it is tricky to find
> the value we just stored when there are multiple headers with the same name.
> (I think the one we just stored would be the last in the list, but I'm
> not sure.)
the Message class __setitem__ is simply:
self._headers.append((name, val))
which means it is just storing a tuple so I suspect is some form of
string conversion on output that is doing the conversion I have come to
know and love. I should probably investigate this a bit more to see if
it is doing exactly what I think it's doing and why.
> The other option is to duplicate the string conversion. If wrapping with
> str() is all that is required, that is probably simplest:
probably not a bad idea. I will experiment with this tomorrow and let
you know how well it works.
---eric
<!DSPAM:FC0FE990B227342170944159>
More information about the Pymilter
mailing list