References:
header in Outlook too long
This leads to some fairly strange errors in exim:
2023-12-15 07:08:19 1rE2J0-0006OO-NK ** name@example.com
<name@example.com> R=dnslookup T=remote_smtp: message is
too big (transport limit = 1)
This is because a line in the email is longer than allowed, in my case I have a customer using outlook sending email to an exim server. The line in question is a header line which the user cannot see or edit and so the problem is confusing for them.
Root Cause
The cause of this error is that every reply will add more to this header, on
the first reply the header will be created and contain the Message-ID:
of
the message that is being replied to:
Message-ID: <001-alice@herdomain.com>
Subject: Hello Bob
References: <001-alice@herdomain.com>
Message-ID: <002-bob@hisdomain.com>
Subject: Re: Hello Bob
References: <001-alice@herdomain.com> <002-bob@hisdomain.com>
Message-ID: <003-alice@herdomain.com>
Subject: Re: Re: Hello Bob
You get the idea, all these references are added to forwarded emails also:
References: <001-alice@herdomain.com> <002-bob@hisdomain.com>
<003-alice@herdomain.com>
Message-ID: <004-alice@herdomain.com>
Subject: Fw: Re: Re: Hello Bob
The line grows until it is longer than 1012 characters and will then will be cut off by Outlook... the problem is that the maximum line length as stated in RFC 2822 is 998 octets.
Solving the Problem
There is no solution to the problem, if you want to use Outlook and this happens the end user must start a new email thread. Sorry, any complaints should be directed to Microsoft but good luck since they seem to have known about this problem for a long time (see the references).
FYI commenting out this option in exim.conf
will NOT help:
deny message = maximum allowed line length is 998 octets, \
got $max_received_linelength
condition = ${if > {$max_received_linelength}{998}}
This is for the content of the message and not the header portion.
Apparently Microsoft Exchange Server handles this problem correctly but I cannot verify that.
Conclusion
The worst thing about this is that at the time of writing it has been a bug in desktop Outlook for more than 12 years!
References
- RFC 2822
- https://learn.microsoft.com/en-us/answers/questions/306083/550-maximum-allowed-line-length-is-998-octets-got
- https://serverfault.com/questions/1109866/automatically-split-references-header-at-998-characters-in-exim
- https://social.technet.microsoft.com/Forums/office/en-US/1f90ba83-e03d-4c21-801f-3078bf6396d2/outlook-bug-with-references-email-header
- https://www.reddit.com/r/sysadmin/comments/9bmjbv/email_rejected_due_to_lengthy_references_in_email/
- https://www.oreilly.com/library/view/sendmail-4th-edition/9780596510299/
- https://blog.kodono.info/wordpress/2019/07/23/exim4-remote_smtp-message-is-too-big-transport-limit-1/
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849770