You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: