This is a cookbook recipe that makes use of midi-smtp-server and Bootstrap Email to process incoming E-Mails through Bootstrap Email to finally transfer the mail to some relay host.
The service may be adjusted by some ENV variables:
The relay host to forward the mail. It must be provided.
The relay host port.
The relay host username.
The relay host password.
Set to true if relay host require STARTTLS
.
Set to true if relay host require SSL
.
Valid values: https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html
- CLIENT_ONCE
- FAIL_IF_NO_PEER_CERT
- NONE
- PEER
The ip-address(es) the mail gateway is listen on.
The port(s) the mail gateway is listen on.
The number of simultaneously processes.
The number of simultaneously connections.
Enable internationalization smtp extension.
Enable SMTP session debug logs.
export BOOTSTRAP_EMAIL_RELAY_HOST="some.smtp.server"
export BOOTSTRAP_EMAIL_GW_DEBUG="true"
ruby service/bootstrap-email-smtp-server.rb
docker build --tag bootstrap-email-smtp-server .
docker run -it --name bootstrap-email-smtp-server --publish 25:25 \
--env BOOTSTRAP_EMAIL_RELAY_HOST="some.smtp.server." \
--env BOOTSTRAP_EMAIL_GW_DEBUG=1 bootstrap-email-smtp-server
Author: Kumy
Based on Slack recipe from Tom Freudenberg, 4commerce technologies AG, released under the MIT license