New submission from Arkadiusz Hiler <a...@hiler.eu>:

RFC5322[0] in section 2.1.1 mandates that the line cannot be longer than 998 
characters and should not be longer than 78 characters (excluding CRLF). When 
we use raw_data_manager (default for EmailPolicy, EmailMessage) it does the 
correct thing as long as the message contains characters outside of 7bit 
US-ASCII set - base64 or qp Content-Transfer-Encoding which respects the line 
wrapping at 78 characters.

However if our message is limited the characters from the 7bit US-ASCII set no 
transfer encoding is applied, and such messages can easily go beyond 78 or even 
998 characters.


[0]: https://tools.ietf.org/html/rfc5322.html#section-2.1.1

----------
components: email
messages: 368641
nosy: barry, ivyl, r.david.murray
priority: normal
severity: normal
status: open
title: generated email message exceeds RFC-mandated limit of 998 characters
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40597>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to