remove unnecessary spamd process (#312)

This commit is contained in:
Kai Ren 2016-09-06 14:06:25 +03:00 committed by Thomas VIAL
parent 2241f9b61e
commit d9e1c0ad61
4 changed files with 3 additions and 17 deletions

View file

@ -49,8 +49,8 @@ RUN sed -i -e 's/#mail_plugins = \$mail_plugins/mail_plugins = \$mail_plugins si
COPY target/dovecot/auth-passwdfile.inc /etc/dovecot/conf.d/ COPY target/dovecot/auth-passwdfile.inc /etc/dovecot/conf.d/
COPY target/dovecot/??-*.conf /etc/dovecot/conf.d/ COPY target/dovecot/??-*.conf /etc/dovecot/conf.d/
# Enables Spamassassin and CRON updates # Enables Spamassassin CRON updates
RUN sed -i -r 's/^(CRON|ENABLED)=0/\1=1/g' /etc/default/spamassassin RUN sed -i -r 's/^(CRON)=0/\1=1/g' /etc/default/spamassassin
# Enables Amavis # Enables Amavis
RUN sed -i -r 's/#(@| \\%)bypass/\1bypass/g' /etc/amavis/conf.d/15-content_filter_mode RUN sed -i -r 's/#(@| \\%)bypass/\1bypass/g' /etc/amavis/conf.d/15-content_filter_mode

View file

@ -64,12 +64,6 @@ run:
-e DISABLE_AMAVIS=1 \ -e DISABLE_AMAVIS=1 \
-h mail.my-domain.com -t $(NAME) -h mail.my-domain.com -t $(NAME)
sleep 20 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 \ docker run -d --name mail_disabled_clamav \
-v "`pwd`/test/config":/tmp/docker-mailserver \ -v "`pwd`/test/config":/tmp/docker-mailserver \
-v "`pwd`/test":/tmp/docker-mailserver-test \ -v "`pwd`/test":/tmp/docker-mailserver-test \
@ -111,4 +105,4 @@ tests:
clean: clean:
# Remove running test containers # Remove running test containers
docker rm -f mail mail_pop3 mail_smtponly mail_fail2ban mail_fetchmail fail-auth-mailer mail_disabled_amavis mail_disabled_spamassassin mail_disabled_clamav mail_manual_ssl docker rm -f mail mail_pop3 mail_smtponly mail_fail2ban mail_fetchmail fail-auth-mailer mail_disabled_amavis mail_disabled_clamav mail_manual_ssl

View file

@ -392,9 +392,6 @@ if [ "$ENABLE_FETCHMAIL" = 1 ]; then
fi fi
# Start services related to SMTP # Start services related to SMTP
if ! [ "$DISABLE_SPAMASSASSIN" = 1 ]; then
/etc/init.d/spamassassin start
fi
if ! [ "$DISABLE_CLAMAV" = 1 ]; then if ! [ "$DISABLE_CLAMAV" = 1 ]; then
/etc/init.d/clamav-daemon start /etc/init.d/clamav-daemon start
fi fi

View file

@ -52,11 +52,6 @@
[ "$status" -eq 1 ] [ "$status" -eq 1 ]
} }
@test "checking process: spamassassin (spamassassin disabled by DISABLE_SPAMASSASSIN)" {
run docker exec mail_disabled_spamassassin /bin/bash -c "ps aux --forest | grep -v grep | grep ''/usr/sbin/spamd'"
[ "$status" -eq 1 ]
}
@test "checking process: clamav (clamav disabled by DISABLE_CLAMAV)" { @test "checking process: clamav (clamav disabled by DISABLE_CLAMAV)" {
run docker exec mail_disabled_clamav /bin/bash -c "ps aux --forest | grep -v grep | grep '/usr/sbin/clamd'" run docker exec mail_disabled_clamav /bin/bash -c "ps aux --forest | grep -v grep | grep '/usr/sbin/clamd'"
[ "$status" -eq 1 ] [ "$status" -eq 1 ]