-
-
Notifications
You must be signed in to change notification settings - Fork 2k
todo: Better support of SMTP_ONLY=1 (send-only / null-mailer) #3477
Copy link
Copy link
Open
Labels
area/documentationarea/featuresarea/scriptskind/improvementImprove an existing feature, configuration file or the documentationImprove an existing feature, configuration file or the documentationmeta/help wantedThe OP requests help from others - chime in! :DThe OP requests help from others - chime in! :Dservice/postfixstale-bot/ignoreIndicates that this issue / PR shall not be closed by our stale-checking CIIndicates that this issue / PR shall not be closed by our stale-checking CI
Metadata
Metadata
Assignees
Labels
area/documentationarea/featuresarea/scriptskind/improvementImprove an existing feature, configuration file or the documentationImprove an existing feature, configuration file or the documentationmeta/help wantedThe OP requests help from others - chime in! :DThe OP requests help from others - chime in! :Dservice/postfixstale-bot/ignoreIndicates that this issue / PR shall not be closed by our stale-checking CIIndicates that this issue / PR shall not be closed by our stale-checking CI
Description
Recently there has been more engagement from the community interested in configuring DMS for the purpose of only sending (or relaying/forwarding) mail, never storing it. This is partially supported from features contributed by a user many years ago, but poorly documented / tested.
I have detailed some insights from a recent discussion on the topic. It should be helpful for anyone looking to tackle this.
SMTP_ONLY=1should probably opt-out of features / services intended for receiving mail to store (via Dovecot). Our docs have a user example guide (LDAP forwarding server) which mentions a few ENV related to this, however in some scenarios it may be desirable to have DMS filter out mail being relayed / submitted, thus could just suggest relevant ENV in docs example admonition.ENABLE_SASLAUTHD=1may be required to ensure users can authenticate to send mail. Could be bypassed withmynetworks? (eg: viaPERMIT_DOCKER) This feature lacks docs too, IIRC it was contributed by a user wanting to pairSMTP_ONLY=1with LDAP instead of Dovecot for user management.For send-only setup, the DNS MX record is configured for a different mail service, and without
SMTP_ONLY=1users have found it problematic to send mail from DMS (as sender[email protected]) to another account of the same domain ([email protected]) as it requires an account to send (setup email add ...), but that is managed via SASL by default with Dovecot, which Postfix also will be configure Dovecot for as thevirtual_transport, recognizing mail for that account domain part as belonging to DMS as a result, then performing a check for the recipient account (which may not exist in Dovecot, but does in the third-party mail service).. thus failing and bouncing the mail submitted to Postfix (over 587/465).This is a task anyone is welcome to contribute a PR for, fully or partially. Documentation contributing to the "Examples" section as a guide would be helpful and easiest, although code + tests would be great too.