Bug 500586 - KMail autocrypt header may be to long for Googlemail
Summary: KMail autocrypt header may be to long for Googlemail
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: crypto (show other bugs)
Version: 6.3.0
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-22 18:18 UTC by Martin Steigerwald
Modified: 2025-02-22 18:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Steigerwald 2025-02-22 18:18:34 UTC
SUMMARY

Googlemail just said:

<incoming+[…]gitlab.com>: host
    aspmx.l.google.com[…] said: 552-5.3.4 The size of one of the
    header values (48072 bytes) exceeds Google's 552-5.3.4 limit of 32768 bytes
    per individual header size. To view our header 552-5.3.4 size guidelines,
    go to 552 5.3.4  https://support.google.com/a?p=header-limits
    5b1f17b1804b1-439b030d392si26206815e9.171 - gsmtp (in reply to end of DATA
    command)

I wondered what header might have that size: Well it is the Autocrypt header. It seems KMail attaches key data with all signatures.

Googlemail was the only receiver which complained so far, but adding in more than 45 KiB to each mail may indeed a bit much? It adds quite a bunch of overhead to each sent mail. On the other hand GMail is known for imposing artificial restrictions like this (while relaying a ton of spam through their service). I have no final judgment on this on the header size limit.

Maybe add an option to only add key data without signature with Autocrypt? Maybe add a way to enable Autocrypt in the composer to the currently edited mail or for certain recipients in address book?

STEPS TO REPRODUCE

1. Enable Autocrypt. 
2. Make sure Autocrypt header is more than 32768 bytes.
3. Send a mail to/through Googlemail.

OBSERVED RESULT

Mail gets rejected by Googlemail.

EXPECTED RESULT

Mail gets accepted.

(I do not agree with Gitlab.com using Googlemail to begin with but that is out of the scope of this bug report.)

SOFTWARE/OS VERSIONS
Linux: Devuan Ceres
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.11.0
Qt Version: 6.7.2