Mail senders: a 421 to QUIT isn't a failed send #41

Merged
jcoffey-dev merged 1 commits from fix/mailflow-quit-421 into main 2026-11-20 23:43:31 +00:00
1 Commits
Author SHA1 Message Date
jcoffey-dev 130c1e405f Mail senders: a 421 to QUIT isn't a failed send
ci / check (pull_request) Successful in 21s
The chaos tests saw a message arrive twice after a pod kill or a drain,
three times in about twenty runs. Each time the send had been retried after
"421 4.3.0 Server shutting down". That 421 was the answer to QUIT, after
the end of DATA had its 250: smtplib's with-statement sends QUIT on the way
out and raises on anything but 221, so the lab took a delivered message for
a failed one and sent it again. The server did nothing wrong.

mailflow.py and soak-load.py now QUIT and close whatever the answer, and
retry only what failed before the 250. The soak running now has the old
sender; a message twice in its report is checked against its retries.
2026-11-20 16:25:47 -07:00