selective service disable (#250)

* Allow disabling amavis service

Setting the `DISABLE_AMAVIS=1` env var will skip the starting of the
amavis process.

* Enable option to not run spamassassin

Setting the `DISABLE_SPAMASSASSIN=1` env var will start this container
without spamassain.

* Allow starting of the container without clamav

Setting the `DISABLE_CLAMAV=1` env var will start this container without
starting clamav.
This commit is contained in:
Kyle Ondy 2016-08-04 15:04:26 -04:00 committed by Thomas VIAL
parent bfecb65947
commit 4872d0e777
3 changed files with 43 additions and 4 deletions

View file

@ -326,9 +326,15 @@ if [ -f /tmp/docker-mailserver/dovecot.cf ]; then
fi
# Start services related to SMTP
/etc/init.d/spamassassin start
/etc/init.d/clamav-daemon start
/etc/init.d/amavis start
if ! [ "$DISABLE_SPAMASSASSIN" = 1 ]; then
/etc/init.d/spamassassin start
fi
if ! [ "$DISABLE_CLAMAV" = 1 ]; then
/etc/init.d/clamav-daemon start
fi
if ! [ "$DISABLE_AMAVIS" = 1 ]; then
/etc/init.d/amavis start
fi
/etc/init.d/opendkim start
/etc/init.d/opendmarc start
/etc/init.d/postfix start