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

@ -48,6 +48,24 @@ run:
-e ENABLE_FAIL2BAN=1 \
--cap-add=NET_ADMIN \
-h mail.my-domain.com -t $(NAME)
sleep 20
docker run -d --name mail_disabled_amavis \
-v "`pwd`/test/config":/tmp/docker-mailserver \
-v "`pwd`/test":/tmp/docker-mailserver-test \
-e DISABLE_AMAVIS=1 \
-h mail.my-domain.com -t $(NAME)
sleep 20
docker run -d --name mail_disabled_spamassassin \
-v "`pwd`/test/config":/tmp/docker-mailserver \
-v "`pwd`/test":/tmp/docker-mailserver-test \
-e DISABLE_SPAMASSASSIN=1 \
-h mail.my-domain.com -t $(NAME)
sleep 20
docker run -d --name mail_disabled_clamav \
-v "`pwd`/test/config":/tmp/docker-mailserver \
-v "`pwd`/test":/tmp/docker-mailserver-test \
-e DISABLE_CLAMAV=1 \
-h mail.my-domain.com -t $(NAME)
# Wait for containers to fully start
sleep 20
@ -77,4 +95,4 @@ tests:
clean:
# Remove running test containers
docker rm -f mail mail_pop3 mail_smtponly mail_fail2ban fail-auth-mailer
docker rm -f mail mail_pop3 mail_smtponly mail_fail2ban fail-auth-mailer mail_disabled_amavis mail_disabled_spamassassin mail_disabled_clamav