-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Feature request: enable SMTP authentication for incoming mail #226
Comments
If this is a desirable feature I could look into it myself |
Please write up a rough plan on how you would implement this, including any UI changes for the web pages and command line flag |
@tyndyll This is a desirable feature - we would host our own mailhog if we could set the smtp password. We need it for our continuous integration and testing. Otherwise we would need to pay for a similar service and they seem to be quite expensive for what they are... Is there no simple way to set the SMTP password using an environment variable - this would be ideal particularly for a Kubernetes environment using secrets. |
Any movement on this one? It would be great to be able to secure SMTP via auth. That way we could host our own Mailhog on a publicly accessibly server. |
For those needing it badly, you could set up an emailrelay as an incoming SMTP proxy, which supports incoming auth. Just a workaround, but it would be great to MailHog to support it out of the box, indeed. |
Based on @pataquets answer, I sat down and tried emailrelay as SMTP proxy. My goal was to test SASL Authentification, but configuring TLS communication is somewhat similar (useage of --server-tls/client-tls insted of --server-auth). Since the whole thing is a little more complex than I thought I would like to document my findings here. I tested the whole thing on Ubuntu, but emailrelay can also be installed on Windows. Installation
emailrelay and emailrelay-passwd should now be installed Runnung emailrelay as auth proxy
We want to run emailrelay as a proxy this can be done in two ways: --as-proxy or --as-server and --forward-on-disconnect. These also need the --forward-to command after which we specifiy the MailHog adress. If the configuration is not immediately clear and you have to try it out, add the parameter In relation to SASL authentication, the parameter --server-auth must be specified.
In this file you can also whitelist specifc ip-ranges but we wont go into that here (see this for more information). Example
If everything worked out correctly you should be able to send a testmail to the configured port (here 587). If no SASL Authentification is configured the logfile should contain something like For further insight I can recommend this reference. |
I would like to enable SMTP authentication (username, password) when configuring MailHog so I can test SMTP interaction with username, password and auth-related failures
The text was updated successfully, but these errors were encountered: