-
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
Allow MailHog to use privileged ports locally #329
base: master
Are you sure you want to change the base?
Conversation
MailHog allows to configure the port where it listens e.g. via the environment variable MH_SMTP_BIND_ADDR. However privileged ports are not allowed, since MailHog runs as normal user. Using setcap the MailHog binary is allowed to bind on privileged ports
@kraxx @tyndyll @anthonyptetlow @rpkamp @teohhanhui Can one of you please merge this pull request? Thanks you 🙏 |
I will look at it over the weekend. Want to understand the implications of using the capabilities before merging. |
Would it be possible to extract the setcap portion as an additional stage in the Dockerfile build? I can then create and publish two images mailhog:latest and mailhog:latest-privileged-ports. This will give people the option of running it |
extract the setcap portion as an additional stage in the Dockerfile build
@tyndyll: Is this what you mean? |
I have security concerns, but I'm 99% sure that they're not valid. I'm just doing some reading up to make sure I'm not missing something! Expect this to be merged in on Friday |
Thanks. Take your time. Better to check than to be sorry. |
@tyndyll Thanks for looking into this. I agree with @martinkoehler that reading up on security should not be rushed. 👍🏻 |
MailHog allows to configure the port where it listens e.g. via
the environment variable MH_SMTP_BIND_ADDR. However privileged ports are
not allowed, since MailHog runs as normal user.
Using setcap the MailHog binary is allowed to bind on privileged ports
Closes #328