postfix/start.sh
Thomas Renger cdffe5d7f8
All checks were successful
ci/woodpecker/push/docker Pipeline was successful
postconf is nice, but it doesn’t play well with a readonly file system
2024-08-07 16:45:28 +02:00

79 lines
2 KiB
Bash

#!/bin/sh
set -e
mkdir -p /var/spool/postfix
chown root:root /var/spool/postfix/
chmod 0755 /var/spool/postfix
mkdir -p \
/var/spool/postfix/active \
/var/spool/postfix/bounce \
/var/spool/postfix/corrupt \
/var/spool/postfix/defer \
/var/spool/postfix/deferred \
/var/spool/postfix/dev \
/var/spool/postfix/etc \
/var/spool/postfix/flush \
/var/spool/postfix/incoming \
/var/spool/postfix/lib \
/var/spool/postfix/maildrop \
/var/spool/postfix/pid \
/var/spool/postfix/private \
/var/spool/postfix/public \
/var/spool/postfix/saved \
/var/spool/postfix/usr \
/var/spool/postfix/hold \
/var/spool/postfix/trace
chmod 00700 /var/spool/postfix/active
chmod 00700 /var/spool/postfix/bounce
chmod 00700 /var/spool/postfix/corrupt
chmod 00700 /var/spool/postfix/defer
chmod 00700 /var/spool/postfix/deferred
chmod 00755 /var/spool/postfix/dev
chmod 00755 /var/spool/postfix/etc
chmod 00700 /var/spool/postfix/flush
chmod 00700 /var/spool/postfix/incoming
chmod 00755 /var/spool/postfix/lib
chmod 01730 /var/spool/postfix/maildrop
chmod 00755 /var/spool/postfix/pid
chmod 00700 /var/spool/postfix/private
chmod 02710 /var/spool/postfix/public
chmod 00700 /var/spool/postfix/saved
chmod 00755 /var/spool/postfix/usr
chown -R postfix:postdrop \
/var/spool/postfix/maildrop \
/var/spool/postfix/public
chown -R postfix:root \
/var/spool/postfix/active \
/var/spool/postfix/bounce \
/var/spool/postfix/corrupt \
/var/spool/postfix/defer \
/var/spool/postfix/deferred \
/var/spool/postfix/flush \
/var/spool/postfix/hold \
/var/spool/postfix/incoming \
/var/spool/postfix/private \
/var/spool/postfix/saved \
/var/spool/postfix/trace
chown root:root \
/var/spool/postfix/dev \
/var/spool/postfix/etc \
/var/spool/postfix/lib \
/var/spool/postfix/pid \
/var/spool/postfix/usr
cp /etc/host.conf \
/etc/hosts \
/etc/nsswitch.conf \
/etc/resolv.conf \
/etc/services \
/var/spool/postfix/etc
exec postfix start-fg $POSTFIX_OPTS