[issue34277] EmailPolicy not followed

2020-07-31 Thread Bryce Drennan
Change by Bryce Drennan : Removed file: https://bugs.python.org/file47720/test_header_folding.py ___ Python tracker <https://bugs.python.org/issue34277> ___ ___ Pytho

[issue34277] EmailPolicy not followed

2018-07-29 Thread Bryce Drennan
New submission from Bryce Drennan : Starting in 3.6.4, the header flattening ignores the EmailyPolicy.utf8 attribute if a header is longer than maxlen. I believe this was introduced in https://github.com/python/cpython/pull/4693. Specifically this part: https://github.com/miss-islington

[issue34277] EmailPolicy not followed

2018-07-30 Thread Bryce Drennan
Bryce Drennan added the comment: Yes, utf8 is set to false. Despite that, the dkim-signature header, which contains no unicode characters, is getting filled with ?utf-8?q? values. My reading of the documentation of the utf8 flag is that headers should not be encoded like this if its set to

[issue34277] EmailPolicy not followed

2018-07-30 Thread Bryce Drennan
Bryce Drennan added the comment: That makes sense. Apologies for my misreading. Thanks for taking time to explain that. I think there is still something strange here since it's unnecessarily using encoded words when it could just "fold" without them. My tests with gmai

[issue34277] EmailPolicy not followed

2018-07-30 Thread Bryce Drennan
Bryce Drennan added the comment: As far as I can tell in my manual tests with gmail, extra whitespace is fine. The addition of `=?utf-8?q?` is what trips both gmail and the python dkim library up. I agree that the paths you propose are viable. For now my email projects will be pinned to

[issue34881] unnecessary encoded-words usage breaks DKIM signatures

2018-10-03 Thread Bryce Drennan
New submission from Bryce Drennan : Since Python 3.6.4 folding of unstructured headers uses the encoded words syntax even if there are no special characters. This makes DKIM-Signature headers that are unreadable to google's gmail servers. It may be that encoded-words are not valid in