Bug 409169

Summary: Header lines can become too long
Product: [Applications] kmail2 Reporter: houz
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: houz
Priority: NOR    
Version: 5.9.3   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In:

Description houz 2019-06-25 10:32:02 UTC
SUMMARY

When sending a mail to many recipients the 'To:' header can become longer than the allowed 998 bytes. KMail should fold it to span several lines so the mails don't get rejected by mail servers.

STEPS TO REPRODUCE
1. Create a new mail.
2. Add many recipients.
3. Send it to someone using (for example) exim.
4. Look at the reject log on the mail server.

OBSERVED RESULT

Mail gets rejected due to header not valid according to RFC 5322.

EXPECTED RESULT

Mail gets delivered because it is not malformed.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: (whatever Debian/sid ships)
(available in About System)
KDE Plasma Version: (whatever Debian/sid ships)
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.3

ADDITIONAL INFORMATION

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