New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
SMTP relay in docker
Hi,
We have an interesting case. In company we have set up beszel to monitor our servers. Internally we have exchange server for development purposes that is able to send emails to internal users. The problem is that exchange does not provide TLS, and beszel can only send mails via TLS enabled SMTP. Does anyone know a simple relay dockerized solution that would basically proxy SMTP by enabling TLS?
I have found exim4 based docker image
https://github.com/BytemarkHosting/docker-smtp
But it also doesn't provide TLS.
Or is my only hope to take this one as an example and create my own docker image by configuring exim4 to enable TLS?

Comments
Maybe try https://hub.docker.com/r/bleala/postfix, can generate self sign cert and etc.
Thanks! Will definitelly look into this!
stunnel could be an option?
nginx can proxy SMTP. nginx has a docker image if you really really really need one. nginx can terminate TLS.
https://github.com/grafana/smtprelay
Thanks! That was the simplest solution.
AND we already had wildcard certificate on the nginx in the compose file, so adding alias mail.organization.name.com for nginx and configuring Beszel to use the hostname worked fine!
You are looking for something that can proxy TCP traffic other than HTTP traffic.
Nginx can do it if you compile it with
ngx_stream_proxyandngx_stream_sslmodule. Many Linux repos doesn't bundle those modules in Nginx by default.HAProxy and Traefik can both do it out of the box if I recall correctly.
We are alrwady using nginx docker container and it has stream proxy enabled.