mox/smtpserver
Mechiel Lukkien 2f5d6069bf
implement "requiretls", rfc 8689
with requiretls, the tls verification mode/rules for email deliveries can be
changed by the sender/submitter. in two ways:

1. "requiretls" smtp extension to always enforce verified tls (with mta-sts or
dnssec+dane), along the entire delivery path until delivery into the final
destination mailbox (so entire transport is verified-tls-protected).

2. "tls-required: no" message header, to ignore any tls and tls verification
errors even if the recipient domain has a policy that requires tls verification
(mta-sts and/or dnssec+dane), allowing delivery of non-sensitive messages in
case of misconfiguration/interoperability issues (at least useful for sending
tls reports).

we enable requiretls by default (only when tls is active), for smtp and
submission. it can be disabled through the config.

for each delivery attempt, we now store (per recipient domain, in the account
of the sender) whether the smtp server supports starttls and requiretls. this
support is shown (after having sent a first message) in the webmail when
sending a message (the previous 3 bars under the address input field are now 5
bars, the first for starttls support, the last for requiretls support). when
all recipient domains for a message are known to implement requiretls,
requiretls is automatically selected for sending (instead of "default" tls
behaviour). users can also select the "fallback to insecure" to add the
"tls-required: no" header.

new metrics are added for insight into requiretls errors and (some, not yet
all) cases where tls-required-no ignored a tls/verification error.

the admin can change the requiretls status for messages in the queue. so with
default delivery attempts, when verified tls is required by failing, an admin
could potentially change the field to "tls-required: no"-behaviour.

messages received (over smtp) with the requiretls option, get a comment added
to their Received header line, just before "id", after "with".
2023-10-24 10:10:46 +02:00
..
alignment.go mox! 2023-01-30 14:27:06 +01:00
analyze.go when moving a message out of a Rejects mailbox, mark the message as "not seen" so stands out in the destination mailbox (e.g. inbox) 2023-09-22 15:53:05 +02:00
dnsbl.go mox! 2023-01-30 14:27:06 +01:00
dsn.go implement "requiretls", rfc 8689 2023-10-24 10:10:46 +02:00
error.go for imap/smtp syntax errors, only echo the remaining buffer if the connection is authenticated 2023-03-10 11:32:34 +01:00
fuzz_test.go implement "requiretls", rfc 8689 2023-10-24 10:10:46 +02:00
limitwriter.go mox! 2023-01-30 14:27:06 +01:00
mx.go implement dnssec-awareness throughout code, and dane for incoming/outgoing mail delivery 2023-10-10 12:09:35 +02:00
parse.go for submission over IPv6, allow missing "IPv6" tag in ip address (unless in pedantic mode) 2023-07-22 14:20:50 +02:00
parse_test.go mox! 2023-01-30 14:27:06 +01:00
rejects.go implement message threading in backend and webmail 2023-09-13 15:44:57 +02:00
reputation.go add flag to ruleset that indicates a message is forwarded, slightly modifying how junk analysis is done 2023-08-09 22:31:37 +02:00
reputation_test.go make mox compile on windows, without "mox serve" but with working "mox localserve" 2023-10-14 10:54:07 +02:00
server.go implement "requiretls", rfc 8689 2023-10-24 10:10:46 +02:00
server_test.go implement "requiretls", rfc 8689 2023-10-24 10:10:46 +02:00