Add dkim from yandex dns

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

View file

@ -69,6 +69,14 @@ if [ "$?" -eq 0 ]; then
record='vmail._domainkey'
selector="\"k=rsa\; p=$p\""
$BIN/v-add-dns-record $user $domain $record TXT "$selector"
if [ "$($BIN/v-list-dns-records $user $domain plain|grep -c '@ MX 10 mx.yandex.ru.')" = "1" ]; then
record='mail._domainkey'
selector=$(host -t TXT mail._domainkey.$domain dns1.yandex.net|grep v\=DKIM1|cut -d\" -f2)
if [ -n "$selector" ]; then
$BIN/v-add-dns-record $user $domain $record TXT "\"$selector\""
fi
fi
fi