Allow MailHog to use privileged ports locally#329
Allow MailHog to use privileged ports locally#329martinkoehler wants to merge 2 commits intomailhog:masterfrom
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