The following line examines the docker starting environment to determine if the SMTP_STARTTLS environment variable is set, and if so, sets the tls_starttls option in /etc/msmtprc to on.
A server can use TLS in one of two modes: via a STARTTLS command
(the session starts with the normal protocol initialization, and
TLS is then started using the protocol's STARTTLS command), or
immediately (TLS is initialized before the normal protocol ini‐
tialization; this requires a separate port). The first mode is
the default, but you can switch to the second mode by disabling
tls_starttls.
My testing shows the following:
if I don't set SMTP_STARTTLS in the environment, tls_starttls is not set in /etc/msmtprc, and therefore starttls is on by default
if I set SMTP_STARTTLS to true in the environment, tls_starttls is explicitly turned on in /etc/msmtprc
if I set SMTP_STARTTLS to false or any other value in the environment, tls_starttls is explicitly turned on in /etc/msmtprc
Can I suggest this script be updated to allow take either on or off for SMTP_STARTTLS, and for /etc/msmtprc to be updated accordingly (and the documentation to be updated to say that if the environment variable is unset then tls_starttls will default to on)?
Hi,
The following line examines the docker starting environment to determine if the
SMTP_STARTTLS
environment variable is set, and if so, sets thetls_starttls
option in/etc/msmtprc
toon
.https://github.com/friendica/docker/blob/ff6db601b3f3a387c9ee10cbed169c4b532f8362/docker-setup_msmtp.sh#L29
However, according to the man page for
msmtp
...My testing shows the following:
SMTP_STARTTLS
in the environment,tls_starttls
is not set in/etc/msmtprc
, and thereforestarttls
is on by defaultSMTP_STARTTLS
totrue
in the environment,tls_starttls
is explicitly turnedon
in/etc/msmtprc
SMTP_STARTTLS
tofalse
or any other value in the environment,tls_starttls
is explicitly turned on in/etc/msmtprc
Can I suggest this script be updated to allow take either
on
oroff
forSMTP_STARTTLS
, and for/etc/msmtprc
to be updated accordingly (and the documentation to be updated to say that if the environment variable is unset thentls_starttls
will default toon
)?