Maximum size of email X-Headers

时光毁灭记忆、已成空白 提交于 2019-12-10 13:53:29

问题


We are looking at sticking some metadata into the X-Headers of email messages. These emails are for consumption by internal systems, and will be hosted on an Exchange server.

Is there a maximum size for the ammount of data that we can store in an X-Header?

Are there any limitations, such as special characters, that I should know about?


回答1:


US ASCII characters only.

This is defined by RFC 822.

There is no limit on the length of a header body in the standard, though there is a line length limit, which imposes a limit on the length of the header name.

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.

You can, however, extend the header body beyond a single line with "folding". The receiver then "unfolds" the lines.

An unfolded header field has no length restriction and therefore may be indeterminately long.

The header name cannot be folded, so the header name cannot be longer than the line limit.

Note that even though the standards have no limitation on the total length of the header body, actual implementations may have imposed artificial limitations.



来源:https://stackoverflow.com/questions/2721605/maximum-size-of-email-x-headers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!