Fix supervisorctl restart postfix bug

This commit is contained in:
kamuri 2017-10-09 23:11:13 +02:00
parent 6e39d63697
commit d436977dcf
5 changed files with 10 additions and 5 deletions

View File

@ -31,6 +31,7 @@ run:
-e VIRUSMAILS_DELETE_DELAY=7 \
-e SASL_PASSWD="external-domain.com username:password" \
-e ENABLE_MANAGESIEVE=1 \
--cap-add=SYS_PTRACE \
-e PERMIT_DOCKER=host \
-e DMS_DEBUG=0 \
-h mail.my-domain.com -t $(NAME)
@ -170,6 +171,7 @@ fixtures:
docker cp "`pwd`/test/config/sieve/dovecot.sieve" mail:/var/mail/localhost.localdomain/user1/.dovecot.sieve
docker exec mail /bin/sh -c "maildirmake.dovecot /var/mail/localhost.localdomain/user1/.INBOX.spam"
docker exec mail /bin/sh -c "chown 5000:5000 -R /var/mail/localhost.localdomain/user1/.INBOX.spam"
sleep 20
# Sending test mails
docker exec mail /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/amavis-spam.txt"
docker exec mail /bin/sh -c "nc 0.0.0.0 25 < /tmp/docker-mailserver-test/email-templates/amavis-virus.txt"

View File

@ -71,6 +71,7 @@ services:
- DMS_DEBUG=0
cap_add:
- NET_ADMIN
- SYS_PTRACE
volumes:
maildata:
@ -125,6 +126,7 @@ services:
- POSTMASTER_ADDRESS=postmaster@localhost.localdomain
cap_add:
- NET_ADMIN
- SYS_PTRACE
volumes:
maildata:

View File

@ -2,7 +2,7 @@ version: '2'
services:
mail:
image: tvial/docker-mailserver:v2
image: tvial/docker-mailserver:lastest
hostname: mail
domainname: domain.com
container_name: mail
@ -21,6 +21,7 @@ services:
- ENABLE_ELK_FORWARDER=1
cap_add:
- NET_ADMIN
- SYS_PTRACE
restart: always
elk:
build: elk

View File

@ -2,7 +2,7 @@ version: '2'
services:
mail:
image: tvial/docker-mailserver:2.1
image: tvial/docker-mailserver:latest
hostname: mail
domainname: domain.com
container_name: mail
@ -23,6 +23,7 @@ services:
- DMS_DEBUG=0
cap_add:
- NET_ADMIN
- SYS_PTRACE
restart: always
volumes:

View File

@ -107,9 +107,8 @@ if ! [ $resu_acc = "OK" ] || ! [ $resu_vir = "OK" ]; then
chown -R 5000:5000 /var/mail
fi
#supervisorctl restart postfix # Buggy causes error while testing.
postfix reload
# Restart of the postfix
supervisorctl restart postfix
# Prevent restart of dovecot when smtp_only=1
if [ ! -f $SMTP_ONLY = 1 ]; then