Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for setting relayhost in main.cf #1104

Merged
merged 3 commits into from
Jan 19, 2019

Conversation

jjtt
Copy link
Contributor

@jjtt jjtt commented Jan 6, 2019

I'm running docker-mailserver for a single domain with ~30 email accounts and all of them forwarding all messages to other email providers. The current RELAY_HOST setting provides much more functionality than I needed and it seems to require that RELAY_USER and RELAY_PASSWORD are also set. However my ISP hasn't provided me with a user and password for the SMTP server and accepts (like most of them do?) SMTP connections from local addresses without authentication.

So the global default relay host setting in main.cf seemed like the simplest solution for my use case.

If set this value will be used as the relayhost in /etc/postfix/maincf
causing all mail to be delivered using this relay host
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@crazystick
Copy link
Contributor

I agree that overall the final configuration is simpler, but I assume that you did just try setting the existing RELAY_HOST and RELAY_PORT settings? For your single domain you should just end up with an /etc/postfix/relayhost_map containing one line @your.domain [mail.yourisp.com]:25 which I would expect to work. You'll get a warning "No relay auth file found and no default set" at startup which you could safely ignore. Have to confess I didn't test this though.

@johansmitsnl
Copy link
Contributor

Is this PR ready?

@jjtt
Copy link
Contributor Author

jjtt commented Jan 17, 2019

I could fix the typo and tidy up the documentation since, as @crazystick noticed, this probably doesn't interfere with RELAY_HOST after all. Other than that, I have nothing more in mind. This setup is in use on my tiny domain.

I did try the RELAY_HOST without user and password and didn't manage to get it to work. But now that I think about it, the reason could have been something completely different. I'll try to find the time to test it again.

@johansmitsnl johansmitsnl merged commit a3724fa into docker-mailserver:master Jan 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants