MAS-WP-0012 finished: one outbound path and one send cap

mas_modes.mailer.Mailer is the only outbound path (own SQLite + lock),
shared by the ticket service and both EmailMode roles. Over the cap mail
is held and reported (send-cap-reached, held); held mail is purged after
email-held-duration-max (7d) and not stored beyond emails-held-storage-max
(100MB). The ticket service's legacy outbox is imported once so the live
count carries over (checked on a copy of the live DB: 4 sent). Entrypoint
passes the cap and both limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 5787@bnt-lap001
Assistant-Session: 5db26b82-138b-40cc-9856-4d5eb0f752fd
This commit is contained in:
tegwick 2026-10-19 12:44:16 +02:00
parent bdf200a600
commit 8de8fddf37
10 changed files with 371 additions and 101 deletions

View file

@ -40,10 +40,13 @@ postconf -e \
# container already isolates Postfix, so run the daemons unchrooted.
postconf -F '*/*/chroot = n'
# The ticket service sends replies only with a relay, capped at MAS_MAX_SENT.
# The ticket service sends replies only with a relay, capped at MAS_MAX_SENT in
# total; over the cap they are held, purged after 7d, at most 100MB (MAS-WP-0012).
SMTP_ARG=""
if [ -n "$MAS_RELAY" ] && [ -s /etc/mas-relay/username ]; then
SMTP_ARG="--smtp 127.0.0.1:25 --max-sent ${MAS_MAX_SENT:-300} --require-dmarc-pass"
SMTP_ARG="--smtp 127.0.0.1:25 --max-sent ${MAS_MAX_SENT:-300} --require-dmarc-pass \
--email-held-duration-max ${MAS_EMAIL_HELD_DURATION_MAX:-7d} \
--emails-held-storage-max ${MAS_EMAILS_HELD_STORAGE_MAX:-100MB}"
fi
# Milters in the foreground: daemonized, OpenDKIM died on its first