mademast / sail

✉️ A strictly standards compliant SMTP server
ISC License
10 stars 0 forks source link

Verify mail data #9

Open gennyble opened 3 years ago

gennyble commented 3 years ago

I believe mail data has to comply with RFC 5322, but not certain. OpenSMTPD and gsmtp do not accept mail if it is not 5322 compliant.

Here's some language form the RFC that further leads me to believe so:

See section 4.1.1.4, paragraph two of the smtp rfc.

the "no mail data" case does not conform to this specification since it would require that neither the trace header fields required by this specification nor the message header section required by RFC 5322 [4] be transmitted

novedevo commented 3 years ago

The above quote could indicate that the mail should not be transmitted on the basis that it lacks trace headers, not necessarily noncompliance with 5322. From 5321, section 3.3, second to last paragraph:

Server SMTP systems SHOULD NOT reject messages based on perceived defects in the RFC 822 or MIME (RFC 2045 [21]) message header section or message body.

However, this may only indicate that it shouldn't reject based on 822, but that it should reject based on 5322. Unsure on the language used here.