clean up output
This commit is contained in:
parent
c03101aa08
commit
f7fab10594
|
@ -43,20 +43,21 @@ fi
|
||||||
|
|
||||||
cd /etc/ssl/dkim
|
cd /etc/ssl/dkim
|
||||||
date +%Y%m%d > $domain.selector
|
date +%Y%m%d > $domain.selector
|
||||||
openssl genrsa -out $domain.pem 2048
|
openssl genrsa -out $domain.pem 2048 2> /dev/null
|
||||||
openssl rsa -in $domain.pem -out $domain.pub -pubout
|
openssl rsa -in $domain.pem -out $domain.pub -pubout 2> /dev/null
|
||||||
tail -n +2 $domain.pub |head -n -1|tr -d '\n' > $domain.dkim
|
tail -n +2 $domain.pub |head -n -1|tr -d '\n' > $domain.dkim
|
||||||
echo `cat $domain.selector`._domainkey.$domain 3600 IN TXT \""k=rsa; p=`cat $domain.dkim`"\" > $domain.dns
|
echo `cat $domain.selector`._domainkey.$domain 3600 IN TXT \""k=rsa; p=`cat $domain.dkim`"\" > $domain.dns
|
||||||
chown Debian-exim:ssl-cert $domain.*
|
chown Debian-exim:ssl-cert $domain.*
|
||||||
|
|
||||||
echo
|
|
||||||
echo Create this dns record:
|
|
||||||
echo
|
|
||||||
cat $domain.dns
|
|
||||||
if [[ -f /usr/local/etc/pdns.conf ]]; then
|
if [[ -f /usr/local/etc/pdns.conf ]]; then
|
||||||
|
dnsname=`cat /etc/ssl/dkim/$domain.selector`
|
||||||
|
dnsname="$dnsname._domainkey.$domain"
|
||||||
|
dnsrecord=`cat /etc/ssl/dkim/$domain.dkim`
|
||||||
|
dnsrecord="k=rsa; p=$dnsrecord"
|
||||||
|
echo pdns-rr-rep.sh -z $domain -n $dnsname -t TXT -r \'$dnsrecord\'
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo Create this dns record:
|
||||||
echo
|
echo
|
||||||
echo Looks like you have powerdns-tools enabled, you can simply run this:
|
cat $domain.dns
|
||||||
echo
|
|
||||||
echo pdns-rr-rep.sh -z $domain -n `cat $domain.selector`._domainkey.$domain -t TXT -r \'k=rsa\; p=`cat $domain.dkim`\'
|
|
||||||
echo
|
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user