Better soultion for DKIM DNS reloading

This commit is contained in:
dpeca 2016-12-28 15:04:51 +01:00
commit 073c0164f1
2 changed files with 2 additions and 5 deletions

View file

@ -123,10 +123,7 @@ if [ ! -z "$DNS_SYSTEM" ] && [ "$dkim" = 'yes' ]; then
p=$(cat $USER_DATA/mail/$domain.pub|grep -v ' KEY---'|tr -d '\n')
record='_domainkey'
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
$BIN/v-add-dns-record $user $domain $record TXT "$policy" '' '' 'no'
record='mail._domainkey'
selector="\"k=rsa\; p=$p\""