docker-mailserver / docker-mailserver/docker-mailserver
todo: Better support of `SMTP_ONLY=1` (send-only / null-mailer)
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 18.9k
- Forks
- 2k
- Avg merge
- 5h 15m
- Merged PRs (30d)
- 28
Description
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=1 users have found it problematic to send mail from DMS (as sender noreply@example.com) to another account of the same domain (admin@example.com) 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 the virtual_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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked discussion and the existing user example guide for an LDAP forwarding server; inspect the current SMTP_ONLY and ENABLE_SASLAUTHD documentation and behavior. Done means the send-only setup's receiving-related behavior and authentication guidance are documented, with code and tests added if behavior changes.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100