Bug 2978

Summary: PGP/MIME encrypted messages contain headers over 80chars line long
Product: Claws Mail (GTK 2) Reporter: LoseDanger
Component: Plugins/Privacy/PGPAssignee: users
Status: NEW ---    
Severity: enhancement    
Priority: P3    
Version: 3.9.1   
Hardware: PC   
OS: All   

Description LoseDanger 2013-07-14 20:12:52 UTC
When sending a PGP/MIME encrypted message, it contains the following header:

Content-Type: multipart/encrypted; boundary="Encrypt_/qKaVJldr8SGctagiHeUkHDf";

This line is 81 characters long (including CRLF). This is in violation of suggestions in rfc5322 which state that a line of characters should be no more than 78 characters long, excluding CRLF.

Hence the Content-Type: header should have a line break included in it, such as:

Content-Type: multipart/encrypted;
 boundary="Encrypt_/qKaVJldr8SGctagiHeUkHDf";

For PGP/MIME signed message, it contains the following header:

Content-Type: multipart/signed; micalg=PGP-SHA512;
 boundary="Sig_/CgLOTG2Yl62fHeyugmhr2Hv"; protocol="application/pgp-signature"

which has a correct line break, to keep it at 80 characters long including CRLF.
Comment 1 Ricardo Mones 2013-07-15 08:43:11 UTC
If you read more on RFC 5322 ยง2.1.1 regarding the 78 chars per line limit explains also why is that limit set. Since these headers are not to be displayed as message content there's little point on wrapping them to be conformant with a SHOULD directive, IMO. BTW, suggestions are not violated, just ignored ;-)

Marking as enhancement, for the hypothetical case someone wants to send a patch.