namshi / docker-smtp

SMTP docker container
MIT License
548 stars 198 forks source link

Support for TLS-only smart hosts. #40

Open pantunex opened 6 years ago

pantunex commented 6 years ago

When configured as a relay docker-smtp doesn't support a TLS-only smart host. TCP connection can be initiated on port 465 but then docker-smtp doesn't even try to initiate the TLS connection.

ericqqqqq commented 4 years ago

Hi @p0xd1, I am facing the same issue here, did you find any solution to this issue?

JHBalaji commented 4 years ago

@ericqqqqq @p0xd1 any solution for TLS hosts?

ericqqqqq commented 4 years ago

@JHBalaji Try this branch, it worked for my needs. Also, check out my reply here, I talked about the details about the branch.

run with command:

docker run -p 25:25 -v $(pwd)/:/etc/ssl/certs \
    -e "KEY_PATH=/etc/ssl/certs/MyKey.key" \
    -e "CERTIFICATE_PATH=/etc/ssl/certs/MyCertificate.crt" \
    -e "SMARTHOST_ADDRESS=your address" \
    -e "SMARTHOST_USER=your username" \
    -e "SMARTHOST_ALIASES=*" \
    -e "SMARTHOST_PORT=465" \
    -e "SMARTHOST_PASSWORD=your apikey" \
    namshi/smtp

For the SMARTHOST_PORT, try 465, 587 and 25. In my case, only 465 worked...

JHBalaji commented 4 years ago

@ericqqqqq I need 587 and this worked for me, https://hub.docker.com/r/juanluisbaptiste/postfix