Comments (6)
Please note that this response was created using generative AI, leveraging previously available information from the repository. This information may be helpful. However, it is our strong recommendation that you carefully consider the information before blindly applying it.
Based on the information provided and the documentation available, it seems like you've encountered a common confusion regarding the use of RELAY_HOST
and DEFAULT_RELAY_HOST
environment variables in Docker Mailserver (DMS) when configuring a relay host for a specific domain.
-
Difference between
RELAY_HOST
andDEFAULT_RELAY_HOST
: Both environment variables are used to configure a default SMTP relay host for outbound emails. However,DEFAULT_RELAY_HOST
is preferable because it is compatible with LDAP, whereasRELAY_HOST
is not. TheDEFAULT_RELAY_HOST
is a newer, more flexible implementation that should be used unless you need support for sender domain opt-out (viasetup relay exclude-domain
), which is only supported withRELAY_HOST
. -
Configuring Relay for Specific Domain: When you want to configure a relay host for a specific domain (e.g., domain A using AWS SES), you should use the
setup relay add-domain
andsetup relay add-auth
commands to specify the domain and its authentication credentials. This approach allows you to configure relay hosts on a per-domain basis without affecting the relay settings for other domains hosted on the same DMS instance. -
Why Setting
RELAY_HOST
Made it Work: It's possible that setting theRELAY_HOST
environment variable globally enabled the relay functionality for your DMS instance, but this is not the recommended approach for a multi-domain setup where only specific domains require relaying. The correct approach is to use thesetup relay
commands as mentioned above. -
Troubleshooting: If emails are not being sent out after configuring the relay for a specific domain, ensure that:
- The domain-specific relay configuration is correctly set up in
postfix-sasl-password.cf
andpostfix-relaymap.cf
. - The credentials and relay host details are correct.
- There are no typos or syntax errors in your configuration files.
- Review the mail server logs for any errors or messages related to the relay configuration.
- The domain-specific relay configuration is correctly set up in
For further assistance, please provide more details about the exact commands you used to configure the relay for domain A and any relevant log output that indicates why the emails were not being sent.
This comment was generated by Glime.
from docker-mailserver.
Besides, just don't see the difference between:
DEFAULT_RELAY_HOST
andRELAY_HOST
, the doc is simply not clear.
It was a legacy issue as these features were contributed by different users in the past AFAIK for their specific needs. We didn't have the same level of quality for reviews back then.
I have refactored it twice since and with edge
(should be released as v14 this month sometime), there my 2nd refactor fixes the concern you've raised here with the inconsistency / bugs. I also rewrote the docs (see here for direct links).
On the new doc pages I mentioned, at the bottom of the relay host page is a technical details admonition. This shows relevant Postfix config you could use via postfix-main.cf
instead of the existing ENV var feature support.
For reference, the page also better documents the two config files that the setup
command helps manage:
If you're comfortable trying :edge
image out to let me know if that is working much better now, I'd appreciate that as I'd like to know if I've missed anything (see the rewritten ENV docs section for additional insights). I also rewrote the AWS SES page which may be relevant to you?
There is still some larger refactoring work planned for this feature in future, if you'd like to subscribe to the tracking issue it is here: #3607
from docker-mailserver.
from docker-mailserver.
Did you fix another issue that has been a pain in ass for a while with setup Alias?
Right now, I can’t forward a copy of my email to another account, as setup Alia’s add does not allow me to add a forward for a real email account!
No, the command has logic to prevent having an alias and actual account with the same address. This was due to various issues in the past where users misused the feature IIRC. You can find details and workarounds on a relevant issue here: #3022 (comment)
Wanting to accept mail for a legit account and send a copy to another address is a use-case that several users have wanted since that is valid. I'm not familiar with other solutions instead of using an alias that points to an account of the same name to achieve that same functionality.
For now you can use the workaround with a manual edit of postfix-virtual.cf
, or you can wait until someone contributes a PR that maintainers approve. I don't think any of the active maintainers are going to fix one problem to introduce the previous problem though, but they'd probably be open to an option like --force
for the setup command to ignore the guard.
Feel free to open a new issue as a feature request for that if you're not comfortable contributing it, someone may come along and tackle it 👍
from docker-mailserver.
This issue has become stale because it has been open for 20 days without activity.
This issue will be closed in 10 days automatically unless:
- a maintainer removes the
meta/stale
label or adds thestale-bot/ignore
label - new activity occurs, such as a new comment
from docker-mailserver.
This issue was closed due to inactivity.
from docker-mailserver.
Related Issues (20)
- feature request: storage limit for a email account HOT 2
- bug report: relay map does not take effect HOT 5
- question: Why does my mail client show a certificate for an FQDN I do not know? HOT 10
- feature request: Does Docker Mailserver support the jmap protocol HOT 4
- fetchmail SMTP error "Sender address rejected: Domain not found" HOT 9
- bug report: forwarded emails are not sent via relay HOT 4
- Your DKIM signature is not valid - opendkim HOT 4
- bug report: `SSL_TYPE=none` should not disable STARTTLS for outbound SMTP connections HOT 8
- question: Why does `SMTP_ONLY=1` still allow to receive mail locally? HOT 5
- bug report: [Windows] No difference after call to 'sed' in 'sedfile' HOT 3
- feature request: Support per-user SASL authentication when used as a relay HOT 3
- Question: How to merge 2 servers into 1? HOT 3
- other: Question lost connection after BDAT / DATA in postfix HOT 3
- How to send email by java-smpt/pop3,how to get auth-code HOT 2
- Userdb alias dummy accounts use wrong home directory HOT 2
- Feature request: Replace Redis HOT 4
- question: Why does LetsEncrypt certificate from `nginxproxy/acme-companion` fail to send mail with TLS? HOT 4
- Rspamd rejects `asciinema` e-mails HOT 44
- bug report: I copied volumes to another system to migrate DMS but it fails to start properly HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-mailserver.