mirror of
https://github.com/ledgersmb/ledgersmb-docker.git
synced 2025-04-19 14:47:12 -04:00
The deprecation is required in order to move to built-in handling of mail instead of relying on external handling by tools like ssmtp.
23 lines
1.1 KiB
Bash
23 lines
1.1 KiB
Bash
#!/bin/bash
|
|
ConfiguredComment='# install script update_ssmtp.sh has configured ssmtp'
|
|
grep -qc "$ConfiguredComment" /etc/ssmtp.conf && {
|
|
echo "smtp configured."
|
|
exit
|
|
}
|
|
|
|
[ -z "$SSMTP_FROMLINE_OVERRIDE" ] || echo "SSMTP_FROMLINE_OVERRIDE (DEPRECATED) won't be supported as of the LedgerSMB 1.8 Docker images"
|
|
[ -z "$SSMTP_AUTH_METHOD" ] || echo "SSMTP_AUTH_METHOD (DEPRECATED) won't be supported as of the LedgerSMB 1.8 Docker images"
|
|
|
|
|
|
sed -i \
|
|
-e "s/\(root=\).*\$/\1$SSMTP_ROOT/g" \
|
|
-e "s/\(mailhub=\).*\$/\1$SSMTP_MAILHUB/g" \
|
|
-e "s/\(hostname=\).*\$/\1$SSMTP_HOSTNAME/g" \
|
|
/etc/ssmtp/ssmtp.conf
|
|
[ -z "$SSMTP_USE_STARTTLS" ] || echo "UseSTARTTLS=$SSMTP_USE_STARTTLS" >> /etc/ssmtp/ssmtp.conf
|
|
[ -z "$SSMTP_AUTH_USER" ] || echo "AuthUser=$SSMTP_AUTH_USER" >> /etc/ssmtp/ssmtp.conf
|
|
[ -z "$SSMTP_AUTH_PASS" ] || echo "AuthPass=$SSMTP_AUTH_PASS" >> /etc/ssmtp/ssmtp.conf
|
|
[ -z "$SSMTP_AUTH_METHOD" ] || echo "AuthMethod=$SSMTP_AUTH_METHOD" >> /etc/ssmtp/ssmtp.conf
|
|
[ -z "$SSMTP_FROMLINE_OVERRIDE" ] || echo "FromLineOverride=$SSMTP_FROMLINE_OVERRIDE" >> /etc/ssmtp/ssmtp.conf
|
|
echo "$ConfiguredComment" >> /etc/ssmtp/ssmtp.conf
|