Disable Postgrey service if it is not being used

This commit is contained in:
John Supplee 2019-03-09 12:11:41 +02:00
parent bb96ee8269
commit 99776c1513
1 changed files with 10 additions and 1 deletions

View File

@ -231,7 +231,7 @@ tools/editconf.py /etc/default/postgrey \
tools/editconf.py /etc/postfix/main.cf \
message_size_limit=134217728
if [ $POSTSRSD == "1" ]; then
if [ $POSTSRSD == 1 ]; then
# Setup SRS
postconf -e \
sender_canonical_maps=tcp:localhost:10001 \
@ -262,4 +262,13 @@ ufw_allow submission
# Restart services
restart_service postfix
if [ $POSTGREY == 1 ]; then
hide_output systemctl enable postgrey
hide_output systemctl restart postgrey
else
hide_output systemctl disable postgrey
hide_output systemctl stop postgrey
fi
restart_service postgrey