<source>
The line requires the submitting client to perform STARTTLS before any commands, except those listed in the manual: EHLO, QUIT, NOOP, XACK, RSET and STARTTLS itself. The default is false.
This is the stricter of the two forms of the requirement. The neighboring require-starttls-before-auth requires encryption only before the password; this one before everything.
It works only together with the permission. allow-starttls must be in the same source, otherwise there is nothing to require.
The price is compatibility. A client that cannot do STARTTLS or is configured for plain submission will not be able to submit at all.
Two forms of the requirement, and they differ in strictness:
| Line | What it requires | Whom you lose |
|---|---|---|
| do not set (default) | nothing | no one; passwords may go out in plain text |
| require-starttls-before-auth | encryption before the password | those who send the password in the clear |
| this line | encryption before everything | also those who submit without authentication |
A sensible order is the second line first, and only if submission is fully under control, the third.
# the strictest form — both lines in the source matched by address <source 10.0.0.0/24> allow-starttls true require-starttls true</source>
what people get wrong and how it ends2 mistakes▶
§ 3.3.7.14
our experience
1 relation
printf 'EHLO test\r\nMAIL FROM:<a@b.c>\r\nQUIT\r\n' | openssl s_client -connect localhost:25 -quiet 2>/dev/null | head -5
3 articles
◇Submission over HTTPS on its own listener, modeled on SparkPostA separate entry point: its own listener with a certificate, its own keys and a reserved source name through which the usual submission settings apply to such mail.◇The receiver declares an encryption requirement on its websiteThe node fetches the recipient domain’s policy over HTTPS and, if it is in enforce mode, delivers only when the MX matches, the connection is encrypted and the certificate is verified.◇The receiver declares an encryption requirement in its DNS zoneThe node looks at the recipient domain’s DANE records and, if STARTTLS is required, sends only over an encrypted channel with a certificate verified by fingerprint.