Giter Club home page Giter Club logo

Comments (6)

glime-ai avatar glime-ai commented on May 24, 2024

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.

  1. Difference between RELAY_HOST and DEFAULT_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, whereas RELAY_HOST is not. The DEFAULT_RELAY_HOST is a newer, more flexible implementation that should be used unless you need support for sender domain opt-out (via setup relay exclude-domain), which is only supported with RELAY_HOST.

  2. 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 and setup 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.

  3. Why Setting RELAY_HOST Made it Work: It's possible that setting the RELAY_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 the setup relay commands as mentioned above.

  4. 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 and postfix-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.

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.

polarathene avatar polarathene commented on May 24, 2024

Besides, just don't see the difference between: DEFAULT_RELAY_HOST and RELAY_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.

image

For reference, the page also better documents the two config files that the setup command helps manage:

image

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.

szguoxz avatar szguoxz commented on May 24, 2024

from docker-mailserver.

polarathene avatar polarathene commented on May 24, 2024

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.

github-actions avatar github-actions commented on May 24, 2024

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 the stale-bot/ignore label
  • new activity occurs, such as a new comment

from docker-mailserver.

github-actions avatar github-actions commented on May 24, 2024

This issue was closed due to inactivity.

from docker-mailserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.