Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

change the smtp port #4

Open
dtrckd opened this issue Jan 14, 2021 · 4 comments
Open

change the smtp port #4

dtrckd opened this issue Jan 14, 2021 · 4 comments

Comments

@dtrckd
Copy link

dtrckd commented Jan 14, 2021

Good evening,

How can we change the smtp port of the exposed container ?
I set it to 25:2525 in the docker-compose file but it doesn't seem to work.

I see that the network ports are also defined in the DockerFile so maybe its hardcoded ?

@tiredofit
Copy link
Owner

TrySMTP_SERVER_PORT as en environment variable.

Defaults are here. Looks like I haven't kept the README up to date for a while, my apologies.

@dtrckd
Copy link
Author

dtrckd commented Jan 14, 2021

thanks @tiredofit.
I just try that: SMTP_SERVER_PORT=2525 docker-compose up -d but the app/config/postal.yml file still have SMTP port at 25.
Is that the right way to proceed ?

@tiredofit
Copy link
Owner

Yes, that should just work, provided you have not switched SETUP_TYPE=MANUAL

This is a snippet of the config that I write:

smtp_server:
  port: ${SMTP_SERVER_PORT}
  tls_enabled: ${SMTP_SERVER_ENABLE_TLS}
  tls_certificate_path: ${SMTP_SERVER_TLS_CERT}
  tls_private_key_path: ${SMTP_SERVER_TLS_KEY}
  tls_ciphers: ${SMTP_SERVER_TLS_CIPHERS}
  ssl_version: ${SMTP_SERVER_SSL_VERSION}
  proxy_protocol: ${SMTP_SERVER_PROXY_PROTOCOL}
  log_connect: ${SMTP_SERVER_LOG_CONNECTIONS}
  strip_received_headers: ${SMTP_SERVER_STRIP_RECEIVED_HEADERS}
  max_message_size: ${SMTP_SERVER_MAX_MESSAGE_SIZE}

@dtrckd
Copy link
Author

dtrckd commented Jan 15, 2021

I tried bringing the docker-compose down then up again and the port is still at 25, I don't know why.

But, I could solved my initial problem related to the port mapping 25:25 which apparently cause some trouble with docker-compose and that resulted in a bad mapping.

It works now by using quote as follows "25:25", as also mentioned here: docker-mailserver/docker-mailserver#684 (comment).

thanks a lot :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants