After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751462 - Include header name length when folding long lines
Include header name length when folding long lines
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
3.16.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2015-06-24 20:25 UTC by Arthur de Jong
Modified: 2015-06-25 20:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Protect header wrapping against reflowing (962 bytes, patch)
2015-06-24 20:25 UTC, Arthur de Jong
committed Details | Review

Description Arthur de Jong 2015-06-24 20:25:31 UTC
Created attachment 306051 [details] [review]
Protect header wrapping against reflowing

Some mail that I sent to mailinglists got silently dropped because the mail ended up with a Face header that had more than 998 characters on a line.

RFC 2822 section 2.1.1 specifies the maximum line length to be 998.

When using the face plugin to configuring an image, a Face header is added to outgoing email. The header is base64 encoded and is typically longer than 998 characters. Evolution wraps the header as follows (which is technically correct):

  Face:<crlf>
  <tab>... 997 more characters ...<crlf>
  <tab>...

However, some mail handling software (at least mailman and apparently also the Debian list software) seem to rewrite the header resulting in the following:

  Face:<space>... 997 more characters ...<crlf>
  <space>...

which means the first line ends up as 1003 characters. While this technically may be a bug in the list software it is probably much easier to work around this in evolution than it is to fix all the deployed mail systems out there.

The attached patch changes the wrapping to not start on the second line. This has the side effect of not having each line contain the same number of base64 characters but does mean that reflowing will not occur.

This was first submitted in the Debian BTS (which contains exact version information, etc.):
https://bugs.debian.org/789616
Comment 1 Milan Crha 2015-06-25 17:31:30 UTC
Thanks for a bug report. This is somewhat related to bug #750201.
Comment 2 Milan Crha 2015-06-25 20:54:31 UTC
I tested the patch and it works fine. The header name is still on its own line in the case of the long string, but when the two lines are concatenated, then they are exactly 998 letters + \r\n, which should be fine.

Created commit d740341 in eds master (3.17.4+)
Created commit 77c5e80 in eds gnome-3-16 (3.16.4+)