Some email headers are subject to validation rules, they must conform to the different RFC Standards. Mail Tester
looks for these email headers and validates the information contained within them.
The RFC5322.FROM header, which contains a name and email address, should conform to section 3.4 of the RFC 5322 documentation as seen below. Mail Tester
validates the RFC522.FROM against the specification below and if it doesn't match it is flagged as a Critical Error.
address = mailbox / group
mailbox = name-addr / addr-spec
name-addr = [display-name] angle-addr
angle-addr = [CFWS] "<" addr-spec ">" [CFWS] /
group = display-name ":" [group-list] ";" [CFWS]
display-name = phrase
mailbox-list = (mailbox *("," mailbox)) / obs-mbox-list
address-list = (address *("," address)) / obs-addr-list
group-list = mailbox-list / CFWS / obs-group-list
The next check is MIME-Version
which at the writing of this blog should be 1.0, but the RFC allows for future versions. If this email header is missing, 1.0 will be assumed and flagged as a warning. If it contains any value, that's not defined in the specification, it will be flagged a critical. The specifation is below.
version := "MIME-Version" ":" 1*DIGIT "." 1*DIGIT
The next check is Content-Type
, which can be many different values. Too many to list out in thie blog, but Mail Tester
does check for all known email content types. The content type defines what the email consists of and which character set is being used. If Mail Tester
doesn't recognize the content-type, it will be flagged a critical. The specification is below.
content := "Content-Type" ":" type "/" subtype
; Matching of media type and subtype
; is ALWAYS case-insensitive.
type := discrete-type / composite-type
discrete-type := "text" / "image" / "audio" / "video" /
"application" / extension-token
composite-type := "message" / "multipart" / extension-token
extension-token := ietf-token / x-token
subtype := extension-token / iana-token
parameter := attribute "=" value
attribute := token
; Matching of attributes
; is ALWAYS case-insensitive.
value := token / quoted-string
token := 1*
tspecials := "(" / ")" / "<" / ">" / "@" /
"," / ";" / ":" / "\" / <">
"/" / "[" / "]" / "?" / "="
; Must be in quoted-string,
; to use within parameter values
The next check is Content-Transfer-Encodings
, which can be many different values. The content transfer encoding defines how the email is encoded. If Mail Tester
doesn't recognize the content-transfer-encoding, it will be flagged a critical. The specifation is below.
encoding := "Content-Transfer-Encoding" ":" mechanism
mechanism := "7bit" / "8bit" / "binary" /
"quoted-printable" / "base64" /
ietf-token / x-token
Read out next blog in the Mail Tester Series: Mail Tester - Email Port Checks
The Mail Tester Pro Report - RFC Header Validation Section
|RFC5322.FROM - Address Specification Test - Section 3.4
|"Mail Test" <firstname.lastname@example.org>
|MIME-Version - Syntax Check - RFC2045
|Content-Type - Syntax Check - RFC2045
|Content-Transfer-Encoding - Syntax Check - RFC2045