1
0
mirror of https://github.com/docker-mailserver/docker-mailserver.git synced 2025-08-08 23:06:49 +02:00

Revert "check-for-changes: performance improvements + wait for settle (#2104)"

This reverts commit 232d463b81.
This commit is contained in:
Nathan Pierce
2021-08-28 19:16:34 -04:00
committed by GitHub
parent 784ec60612
commit dff7e428c0
9 changed files with 188 additions and 216 deletions

View File

@ -63,3 +63,13 @@ echo "${FULL_EMAIL}|${HASH}" >> "${DATABASE}"
USER="${FULL_EMAIL%@*}"
DOMAIN="${FULL_EMAIL#*@}"
# Tests fail if the creation of /var/mail/${DOMAIN}/${USER} doesn't happen fast enough after addmailuser executes (check-for-changes.sh race-condition)
if [[ -e "/tmp/docker-mailserver-config-chksum" ]] # Prevent infinite loop in tests like "checking accounts: user3 should have been added to /tmp/docker-mailserver/postfix-accounts.cf even when that file does not exist"
then
while [[ ! -d "/var/mail/${DOMAIN}/${USER}" ]]
do
echo "Waiting for dovecot to create /var/mail/${DOMAIN}/${USER}..."
sleep 1
done
fi

View File

@ -154,6 +154,7 @@ use 'sudo docker exec mailserver rm -R /var/mail/${DOMAIN}/${USER}'"
rmdir "/var/mail/${DOMAIN}" 2>/dev/null || true
else
echo "Mailbox directory '/var/mail/${DOMAIN}/${USER}' did not exist." >&2
ERROR=true
fi
${ERROR} && errex 'See the messages above.'