0

Are MTAs responsible for wrapping long header fielders and mail bodies?

Put differently, can the MUA be a complete asshole (example below) and leave it to the MTA to wrap messages to multiple lines as necessary to deliver the message to its final destination?

To: (1000 recipients on a single line) Subject: (Complete transcript of "Eddie Murphy RAW" on a single line) (The King James Bible on a single line.) 

1 Answer 1

4

No; the absolute limit is 998 characters, and the recommended limit is 78 characters. This comes from the current standard for email messages, RFC5322. In section 2.1.1, "Line Length Limits", it states:

There are two limits that this specification places on the number of characters in a line. Each line of characters MUST be no more than 998 characters, and SHOULD be no more than 78 characters, excluding the CRLF.

However, MUA:s should be able to display messages properly even if the lines are longer than recommended. In the same section:

it is incumbent upon implementations that display messages to handle an arbitrarily large number of characters in a line (certainly at least up to the 998 character limit) for the sake of robustness.

1
  • 1
    Yes; I’d add that the onus is on MSAs to enforce message format (see RFC 4409 section 8). It is however expected that headers may be folded at any point (RFC 2822 section 2.2.3). Commented Jun 4, 2018 at 12:52

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.