Add dkim from yandex dns

Автоматическое добавление DKIM от Яндекс.ПДД
This commit is contained in:
kinolaev 2014-01-09 18:42:00 +03:00
commit 176161e311

View file

@ -477,6 +477,14 @@ rebuild_mail_domain_conf() {
p=$(cat $pub|grep -v ' KEY---'|tr -d '\n')
slct="\"k=rsa\; p=$p\""
$BIN/v-add-dns-record $user $domain $record TXT "$slct"
if [ "$($BIN/v-list-dns-records $user $domain plain|grep -c '@ MX 10 mx.yandex.ru.')" = "1" ]; then
record='mail._domainkey'
slct=$(host -t TXT mail._domainkey.$domain dns1.yandex.net|grep v\=DKIM1|cut -d\" -f2)
if [ -n "$slct" ]; then
$BIN/v-add-dns-record $user $domain $record TXT "\"$slct\""
fi
fi
fi
fi