You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-08-10 22:31:47 +02:00
Added config folder for Postfix
This commit is contained in:
@@ -47,6 +47,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /freeposte/freeposte:/data
|
- /freeposte/freeposte:/data
|
||||||
- /freeposte/certs:/certs
|
- /freeposte/certs:/certs
|
||||||
|
- /freeposte/config/postfix:/config
|
||||||
|
|
||||||
milter:
|
milter:
|
||||||
build: rmilter
|
build: rmilter
|
||||||
|
@@ -48,4 +48,8 @@ lmtp_host_lookup = native
|
|||||||
smtpd_milters = inet:milter:9900
|
smtpd_milters = inet:milter:9900
|
||||||
milter_protocol = 6
|
milter_protocol = 6
|
||||||
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
|
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
|
||||||
milter_default_action = tempfail
|
milter_default_action = tempfail
|
||||||
|
|
||||||
|
###############
|
||||||
|
# Extra Settings
|
||||||
|
###############
|
||||||
|
@@ -5,6 +5,25 @@ for VARIABLE in `env | cut -f1 -d=`; do
|
|||||||
sed -i "s={{ $VARIABLE }}=${!VARIABLE}=g" /etc/postfix/*.cf
|
sed -i "s={{ $VARIABLE }}=${!VARIABLE}=g" /etc/postfix/*.cf
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Override Postfix configuration
|
||||||
|
if [ -f /config/main.cf ]; then
|
||||||
|
while read line; do
|
||||||
|
postconf -e "$line"
|
||||||
|
done < /config/main.cf
|
||||||
|
echo "Loaded 'config/main.cf'"
|
||||||
|
else
|
||||||
|
echo "No extra postfix settings loaded because optional '/config/main.cf' not provided."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Include table-map files
|
||||||
|
if [ "$(ls -A /config/*.map)" ]; then
|
||||||
|
cp /config/*.map /etc/postfix/
|
||||||
|
postmap /etc/postfix/*.map
|
||||||
|
rm /etc/postfix/*.map
|
||||||
|
chown root:root /etc/postfix/*.db
|
||||||
|
chmod 0600 /etc/postfix/*.db
|
||||||
|
fi
|
||||||
|
|
||||||
# Actually run Postfix
|
# Actually run Postfix
|
||||||
rm -f /var/run/rsyslogd.pid
|
rm -f /var/run/rsyslogd.pid
|
||||||
/usr/lib/postfix/master &
|
/usr/lib/postfix/master &
|
||||||
|
Reference in New Issue
Block a user