mirror of
https://github.com/friendica/docker
synced 2026-01-05 19:47:59 +01:00
Replace HOSTNAME environment variable with SMTP_DOMAIN (fixes https://github.com/friendica/docker/issues/79 )
This commit is contained in:
parent
33c5e36247
commit
fbfa30b0cd
16 changed files with 36 additions and 55 deletions
|
|
@ -17,7 +17,7 @@ version_greater() {
|
|||
}
|
||||
|
||||
setup_ssmtp() {
|
||||
if [ -n "${HOSTNAME+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost" ]; then
|
||||
if [ -n "${SMTP_DOMAIN+x}" ] && [ -n "${SMTP+x}" ] && [ "${SMTP}" != "localhost" ]; then
|
||||
SITENAME="${FRIENDICA_SITENAME:-Friendica Social Network}"
|
||||
echo "Setup SSMTP for '$SITENAME' with '$SMTP' ..."
|
||||
|
||||
|
|
@ -29,14 +29,14 @@ setup_ssmtp() {
|
|||
|
||||
# add possible mail-senders
|
||||
{
|
||||
echo "www-data:$smtp_from@$HOSTNAME:$SMTP"
|
||||
echo "root::$smtp_from@$HOSTNAME:$SMTP"
|
||||
echo "www-data:$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
echo "root::$smtp_from@$SMTP_DOMAIN:$SMTP"
|
||||
} > /etc/ssmtp/revaliases
|
||||
|
||||
# replace ssmtp.conf settings
|
||||
{
|
||||
echo "root=:$smtp_from@$HOSTNAME"
|
||||
echo "hostname=$HOSTNAME"
|
||||
echo "root=:$smtp_from@$SMTP_DOMAIN"
|
||||
echo "hostname=$SMTP_DOMAIN"
|
||||
echo "mailhub=$SMTP"
|
||||
echo "FromLineOverride=YES"
|
||||
if [ -n "${SMTP_TLS+x}" ]; then echo "UseTLS=$SMTP_TLS"; fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue