[Email-SIG] Some parsing/generation issues of email in Python 3

Hans-Peter Jansen hpj at urpla.net
Sun Jun 12 17:30:42 EDT 2016


Hi Matt,

thanks for your hints.

On Sonntag, 12. Juni 2016 13:01:13 Matthew Dixon Cowles wrote:
> Pete,
> 
> > Note, that the subject line is missing. In my real filter, it left
> > the current execution frame, and execution continued one or two
> > level up the stack.
> 
> The only thing I've run into that's like that is when an exception is
> raised in a function that I didn't think would do that and was caught
> in a place that I didn't expect.

Yes, sure, that's a more common situation.

> That it happens with the logging module and a non-ASCII encoding but
> only when run in an environment with very few environment variables
> also suggests something like that to me.
> 
> I realize that that's not what your example code suggests, but if it
> were obvious it would already be fixed.

Yes, of course. 

BTW, I even tried to recreate the way, that postfix ought to run the filter 
with no positive result, either. There's something fishy going on here. 

Meanwhile, I've reduced the code to the bare minimum (attached). I also 
noticed, that the example mail is displayed in funny ways in my MUA, therefore 
attached again gzipped..

Thanks,
Pete
-------------- next part --------------
A non-text attachment was scrubbed...
Name: umlaut-subject-2.mail.gz
Type: application/gzip
Size: 328 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/email-sig/attachments/20160612/926667d9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mail_filter_test.py
Type: text/x-python
Size: 1981 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/email-sig/attachments/20160612/926667d9/attachment.py>


More information about the Email-SIG mailing list