Email Header too Long

emailspam

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.

Best Answer

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.

Related Topic