diff --git a/Dockerfile b/Dockerfile index 78fc2ff..286a498 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN set -ex; \ apt-get update; \ \ apt-get install -y --no-install-recommends \ - ssmtp \ + msmtp \ ; \ \ rm -rf /var/lib/apt/lists/* ;\ diff --git a/build-rootfs.sh b/build-rootfs.sh index 95bcfac..bb4259c 100755 --- a/build-rootfs.sh +++ b/build-rootfs.sh @@ -3,6 +3,7 @@ set -ex # Configuration options you usually edit go here +CONTAINER_MSMTPCONFDIR=/etc CONTAINER_SSMTPCONFDIR=/etc/ssmtp CONTAINER_PHP_CONFD=/usr/local/etc/php/conf.d @@ -14,6 +15,7 @@ BUILDDIR=$(pwd)/build SCRIPTS_SRC=${SRCDIR}/scripts ROOTFSTREE=${TMPDIR}/tree ROOTFSFILE=${BUILDDIR}/rootfs.tar.gz +MSMTPRC_DST=${ROOTFSTREE}${CONTAINER_MSMTPCONFDIR} SSMTPCONF_DST=${ROOTFSTREE}${CONTAINER_SSMTPCONFDIR} PHP_CONFD_DST=${ROOTFSTREE}${CONTAINER_PHP_CONFD} @@ -31,8 +33,12 @@ mkdir ${BUILDDIR} #### Do the work. # Create SSMTP config file -mkdir -p ${SSMTPCONF_DST} -cp ${SRCDIR}/ssmtp.conf ${SSMTPCONF_DST}/ssmtp.conf +#mkdir -p ${SSMTPCONF_DST} +#cp ${SRCDIR}/ssmtp.conf ${SSMTPCONF_DST}/ssmtp.conf + +# Create MSMTP config file (SSMTP is currently unavailble in Debian Buster) +mkdir -p ${MSMTPRC_DST} +cp ${SRCDIR}/msmtprc ${MSMTPRC_DST}/msmtprc # Setup PHP mkdir -p ${PHP_CONFD_DST} diff --git a/src/mail.ini b/src/mail.ini index a0c5ff4..7149cd2 100644 --- a/src/mail.ini +++ b/src/mail.ini @@ -1 +1 @@ -sendmail_path = "/usr/sbin/ssmtp -t -i" +sendmail_path = "/usr/bin/msmtp -t" diff --git a/src/msmtprc b/src/msmtprc new file mode 100644 index 0000000..278f366 --- /dev/null +++ b/src/msmtprc @@ -0,0 +1,10 @@ +account default + +host nathan.nehmer.net +tls on +tls_starttls on +domain docker.nehmer.net + +from postmaster@nehmer.net +maildomain nehmer.net +