diff --git a/Dockerfile b/Dockerfile index 5063ed3..cbffdc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,6 +40,7 @@ RUN set -x \ # Configure Postfix / dkim RUN set -x \ + && postconf -e myhostname="localhost" \ && postconf -e smtpd_banner="\$myhostname ESMTP" \ && postconf -Me submission/inet="submission inet n - y - - smtpd" \ && postconf -Me 2525/inet="2525 inet n - y - - smtpd" \ diff --git a/s6/postfix/run b/s6/postfix/run index 9c9955c..1db084b 100755 --- a/s6/postfix/run +++ b/s6/postfix/run @@ -30,10 +30,12 @@ unset LANG cd /etc/postfix # Copy default spool from cache +# Note: this test may get confused if a volume is mounted that already contains unrelated directories (eg lost+found) if [ ! "$(ls -A /var/spool/postfix)" ]; then - cp -a /var/spool/postfix.cache/* /var/spool/postfix/ + echo "postfix >> Copying postfix spool directory from postfix.cache (from the image)" + cp -a /var/spool/postfix.cache/* /var/spool/postfix/ else - # Fix spool directory permissions + echo "postfix >> Fixing/resetting spool directory permissions" chgrp -R postdrop /var/spool/postfix/public chgrp -R postdrop /var/spool/postfix/maildrop postfix set-permissions