Skip to content

Commit

Permalink
Reset myhostname to avoid build server rDNS being used, add some note…
Browse files Browse the repository at this point in the history
…s and info when fixing spool dir
  • Loading branch information
trnubo committed Jan 31, 2024
1 parent 38360e9 commit 5754633
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
6 changes: 4 additions & 2 deletions s6/postfix/run
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5754633

Please sign in to comment.