Need help configuring Mailserver as Relay #3770
Replies: 2 comments 17 replies
-
Port 25 is for delivery. Mail inbound is checked against an account to deliver to, if there's a valid recipient it's accepted, otherwise it's rejected. If this server is never meant to receive mail, don't expose port 25. Port 587 is for StartTLS mail submission. This is what your relay should be using to authenticate against a DMS user account on the relay DMS. You configure credentials and it will relay the mail for you after successful authentication. I believe we have port 587 configured to reject if TLS cannot be established via StartTLS. However if you want to enforce it, you should be using port 465 instead which is implicit TLS similar to HTTPS.
This is a null mail client. There are similar names for it. We partially support this with Technically if you have no use for the internal DMS for anything else, the applications that would mail it could connect to the external DMS over port 465 with credentials (either with the same username/password, or individual credentials to better isolate a compromised account). A common setup is to have local services submit mail via DMS on port 465, and have DMS use a third-party like SendGrid as the relayhost (DMS sends outbound mail to the relayhost with credentials configured). In your description, you're using DMS as a relayhost (external MTA).
We have You can enable We have a separate lookup table though that would be useful here, a regexp alias (
I believe we have support for Dovecot to be set to an external instance instead. However you'd need to keep any accounts in sync between the two that it's kinda like setting up two DMS instances anyway..? One other option might be to just have the external/public server proxy to the internal one? (inbound traffic flows from external server to internal DMS, and outbound traffic for internal DMS flows through external server)
Ok, so this is really about the DMS instance on the external server being your primary instance, with DNS records to direct mail to it from that domain. The internal instance could instead sync / pull mail from that external instance, or perhaps via aliases forward it to an internal non-public domain? I think in that instance, it may have Postfix try to send the mail from external DMS to internal DMS, and when not reachable, it'll be kept in a queue to try again with exponential backoff.
Oh alright, you already went with You can use LDAP or look through related issues on the feature for how other users were manually setting up a user account.
I don't think I see this setup discussed often. But a null mail client instance yes. A relayhost instance yes. The other concerns perhaps are just approaching it the wrong way? |
Beta Was this translation helpful? Give feedback.
-
|
@tedstriker did your setup now works? Would you like to share your configs? I want to have the same setup (home mailserver behind a dynamic ip already receives all my mails - now i want to use my other, external mailserver with a static ip for sending my private mails). |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm trying to use the mail server as a relay for outgoing mail for my domain. But unfortunately I can't get it to work, because
I couldn't find the - what I think - necessary configuration attributes in form of environment variables, config files, etc. if they exist.
Environment
The container with the "to be relay mail server" runs on a hosted server with a fixed IP. Lets call it external mail server for better distinction.
It will receive Mails from *@myowndomain.com from an internal mail server, where all accounts and aliases are configured.
So the flow would be: my email -> internal mail server -> external mail server -> destination mail server
Goals
Here's what I'm trying to achieve
I know how to configure it, so that's already possible
Bonus goals
What I got so far...
SMTP_ONLY=1The struggle
All the time I'm thinking "It can't be that complicated", probably it's just a few variables to be set, but for my life I can't figure out.
Is this even possible with Docker Mail Server?
Any help is appreciated
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions