Skip to content

Commit

Permalink
Make msmtp from variable fully configurable. Fixes xibosignage/xibo#2519
Browse files Browse the repository at this point in the history
  • Loading branch information
alexharrington committed May 27, 2021
1 parent a721c40 commit a6cda1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Expand Up @@ -141,6 +141,7 @@ ENV CMS_DEV_MODE=false \
CMS_SMTP_REWRITE_DOMAIN=gmail.com \
CMS_SMTP_HOSTNAME=none \
CMS_SMTP_FROM_LINE_OVERRIDE=YES \
CMS_SMTP_FROM=none \
CMS_ALIAS=none \
CMS_PHP_SESSION_GC_MAXLIFETIME=1440 \
CMS_PHP_POST_MAX_SIZE=2G \
Expand Down
9 changes: 7 additions & 2 deletions docker/entrypoint.sh
Expand Up @@ -250,8 +250,13 @@ then

/bin/sed -i "s/maildomain .*$/maildomain $CMS_SMTP_REWRITE_DOMAIN/" /etc/msmtprc
/bin/sed -i "s/domain .*$/domain $CMS_SMTP_HOSTNAME/" /etc/msmtprc

/bin/sed -i "s/from .*$/from cms@$CMS_SMTP_REWRITE_DOMAIN/" /etc/msmtprc

if [ "$CMS_SMTP_FROM" == "none" ]
then
/bin/sed -i "s/from .*$/from cms@$CMS_SMTP_REWRITE_DOMAIN/" /etc/msmtprc
else
/bin/sed -i "s/from .*$/from $CMS_SMTP_FROM/" /etc/msmtprc
fi

mkdir -p /var/www/cms/library/temp
chown apache.apache -R /var/www/cms/library
Expand Down

0 comments on commit a6cda1f

Please sign in to comment.