From 8bfe11b86ddd79e9a23d955f9fc0084796f23147 Mon Sep 17 00:00:00 2001 From: dpeca Date: Tue, 27 Dec 2016 16:58:37 +0100 Subject: [PATCH] Fixing missing mail._domainkey when adding domain Closing issue https://github.com/serghey-rodin/vesta/issues/990 --- bin/v-add-mail-domain | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/v-add-mail-domain b/bin/v-add-mail-domain index eedc02d9..325e319c 100755 --- a/bin/v-add-mail-domain +++ b/bin/v-add-mail-domain @@ -125,6 +125,9 @@ if [ ! -z "$DNS_SYSTEM" ] && [ "$dkim" = 'yes' ]; then policy="\"t=y; o=~;\"" $BIN/v-add-dns-record $user $domain $record TXT "$policy" + # Wait one second to avoid editing bind zone in the same unixtime second, because bind will not reload zone if new and last modification occur in the same unixtime second + sleep 1 + record='mail._domainkey' selector="\"k=rsa\; p=$p\"" $BIN/v-add-dns-record $user $domain $record TXT "$selector"