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

Allow use of privileged ports locally in Docker #328

Open
martinkoehler opened this issue Nov 7, 2020 · 0 comments · May be fixed by #329
Open

Allow use of privileged ports locally in Docker #328

martinkoehler opened this issue Nov 7, 2020 · 0 comments · May be fixed by #329

Comments

@martinkoehler
Copy link

MailHog allows to configure the port where it listens e.g. via
the environment variable MH_SMTP_BIND_ADDR. However specifing a privileged ports does not work, since MailHog runs as normal user.

Usually you run a MailHog Dockercontainer and expose the ports via the host. However if you need to access the container from another Docker container via an internal network, this mapping does not work and the configured port must be used.

A scenario where this gives problems is the following:
Assume you have one container A that is configured to send mails via a smarthost named smtp.domain.com
Run MailHog as a Docker container.
Connect both container with an internal network N and set a Docker alias for the MailHog container assmtp.domain.com.
Then from A MailHog can be accessed via smtp.domain.com, but the port is the internal port of the Docker container. The original smtp.domain.com smarthost usually uses the privileged port 25. If Mailhog could be configured to listen on the port 25 internally, A could run unchanged and all mails would end up at MailHog.

@martinkoehler martinkoehler linked a pull request Nov 7, 2020 that will close this issue
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 a pull request may close this issue.

1 participant