Skip to content

Commit

Permalink
fix container restarts
Browse files Browse the repository at this point in the history
  • Loading branch information
Topheee committed Feb 8, 2023
1 parent e999007 commit e0b6e14
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ fi

chmod -R 600 /etc/courier/userdb

echo "$MAIL_DOMAIN" > /etc/mailname
# now this is absolutely crazy: postfix checks the number of hard links on a file. But since Docker seems to internally use these, we must limit the amount of changes we make to the fs.
if [ ! grep -q "$MAIL_DOMAIN" /etc/mailname ]; then echo "$MAIL_DOMAIN" > /etc/mailname; fi
echo "$MAIL_DOMAIN" > /etc/postfix/vhosts
# create default account
/usr/local/bin/add_mailbox.sh postmaster
Expand Down Expand Up @@ -70,6 +71,9 @@ if [ ! -z "$CERTFILE" ]; then
cat "$CERTFILE" "$KEYFILE" "$DHFILE" > $IMAPCERTFILE
fi

# clear PID files
rm -f /var/spool/postfix/var/run/saslauthd/saslauthd.pid /var/run/courier/imapd.pid /var/run/courier/imapd-ssl.pid /var/spool/postfix/pid/master.pid

postfix reload

/usr/sbin/rsyslogd -f/etc/rsyslog.conf
Expand Down

0 comments on commit e0b6e14

Please sign in to comment.