2
0
Fork 0
mirror of https://github.com/friendica/docker synced 2024-05-24 09:54:57 +02:00

Merge pull request #150 from miklobit/stable

set /etc/msmtprc 'auth' parameter from SMTP_AUTH env
This commit is contained in:
Hypolite Petovan 2021-04-18 00:15:29 -04:00 committed by GitHub
commit 994a54a4ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 27 additions and 13 deletions

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"

View file

@ -113,6 +113,7 @@ The following environment variables are possible for the SMTP examples.
- `SMTP_FROM` Sender user-part of the address. (Default: `no-reply` - e.g. no-reply@friendica.local)
- `SMTP_TLS` Use TLS for connecting the SMTP Mail-Gateway. (Default: empty)
- `SMTP_STARTTLS` Use STARTTLS for connecting the SMTP Mail-Gateway. (Default: empty)
- `SMTP_AUTH` Auth mode for the SMTP Mail-Gateway. (Default: `On`)
- `SMTP_AUTH_USER` Username for the SMTP Mail-Gateway. (Default: empty)
- `SMTP_AUTH_PASS` Password for the SMTP Mail-Gateway. (Default: empty)

View file

@ -6,6 +6,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "Setup MSMTP for '$SITENAME' with '$SMTP' ..."
smtp_from="${SMTP_FROM:=no-reply}"
smtp_auth="${SMTP_AUTH:=on}"
# Setup MSMTP
usermod --comment "$(echo "$SITENAME" | tr -dc '[:print:]')" root
@ -26,7 +27,7 @@ if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost"
echo "tls_certcheck off" # No certcheck because of internal docker mail-hostnames
if [ -n "${SMTP_TLS+x}" ]; then echo "tls on"; fi
if [ -n "${SMTP_STARTTLS+x}" ]; then echo "tls_starttls on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth on"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "auth $smtp_auth"; fi
if [ -n "${SMTP_AUTH_USER+x}" ]; then echo "user \"$SMTP_AUTH_USER\""; fi
if [ -n "${SMTP_AUTH_PASS+x}" ]; then echo "password \"$SMTP_AUTH_PASS\""; fi
echo "logfile /var/log/msmtp.log"