Are email headers case sensitive?

RFC 5322 does actually specify this, but it is very indirect.

Section 1.2.2 says:

This specification uses the Augmented
Backus-Naur Form (ABNF) [RFC5234]
notation for the formal definitions of
the syntax of messages.

In turn, Section 2.3 of RFC 5234 says:

NOTE:

ABNF strings are case insensitive and the character set for
these strings is US-ASCII.

So when RFC 5322 specifies a production rule like this:

from = “From:” mailbox-list CRLF

It is implicit that the “From:” is not case-sensitive.

[update]

As for Content-Type and MIME-Version, they are specified by the MIME spec (RFC 2045). That in turn refers to the BNF described by the original RFC 822, which (luckily) also makes it clear that these literal strings are case-insensitive.

Bottom line: According to the spec, Email headers are not case-sensitive, so it sounds like your mail server is buggy.

Leave a Comment

tech