I was told that this would fit here after I put it on WebMasters.

I am hoping someone can tell me what would happen if a line in an email header was longer than the maximum 998 characters as specified by RFC-2822.

My original question follows:

I am investigating an error in some emails being sent out. We send an email to the client, the ISP runs it through a CloudMark anti spam check. This check then adds and X-CNFS-Analysis header which is over 998 characters long (longer than it is allowed to be according to RFC-2822) .

These emails are showing up as pure garbage. If a header line is too long could this cause the email to become garbage?

This only happens when sending to clients using Hotmail.

  • 3
    RFC 2822 is clear: Header lines MUST not be longer then 998 characters or be properly folded (as is also explained in the RFC). If CloudMark violates this, this could have all kind of consequences when a client can't properly handle this. It's impossible though to tell if what you experience is a consequence of this rule violation, especially without any of the fundamental things one would expect with this kind of question like examples ...
    – Sven
    Jun 27 '16 at 15:08
  • @Sven unfortunately I can not give the examples. As of now we are just going to strip all the headers and make a "new" email Jun 27 '16 at 16:13

The currently relevant RFC, RFC 5322, states how an email should be formatted. It does not specify how any email program (whether server or client) should handle emails which are not properly formatted. Thus, it is up to whoever writes the software to make that decision.

In other words, there is no general answer to your question. Some programs may give an error message, some may chop the line off at the limit or reformat it properly... and others may display garbage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.