huan / docker-simple-mail-forwarder

Simplest and Smallest Email Forward Service based on Docker.
https://hub.docker.com/r/zixia/simple-mail-forwarder/
Apache License 2.0
544 stars 88 forks source link

Use port 110 instead of port 25? #105

Open ibnYusrat opened 3 years ago

ibnYusrat commented 3 years ago

Hi,

Thank you for this amazing docker image. I am trying to deploy this in a compute engine on GCP. However, by default GCP has blocked port 25 permanently. Is it possible to use port 110 instead? Please help!

JeffHiggy commented 3 years ago

This is the exact reason that I don't use GCP. And it seems that they don't let you remap ports which is silly. The easiest solution is to see if you can use a reverse proxy like Traefik (this is what I do to get email on 110).

If you want to do it natively in the container then you will have to clone the repo and build your own with port 110 exposed instead of 25, you will also have to make the necessary postfix changes.

huan commented 3 years ago

I believe this can be easily achieved by remapping the port by the docker run command?

docker run -e SMF_CONFIG -p 25:110 zixia/simple-mail-forwarder
ibnYusrat commented 3 years ago

I believe this can be easily achieved by remapping the port by the docker run command?

docker run -e SMF_CONFIG -p 25:110 zixia/simple-mail-forwarder

Hi Huan,

Can you confirm if this indeed works?

huan commented 3 years ago

@ibnYusrat I have not confirmed by myself, but I guess it should work, except that the port should be switched:

docker run -e SMF_CONFIG -p 0.0.0.0:110:25 zixia/simple-mail-forwarder

See: https://docs.docker.com/config/containers/container-networking/