Author Topic: DKIMing  (Read 13094 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
DKIMing
« on: February 25, 2015, 07:10:33 PM »
Don't know if I did something wrong but add DKIM clicky button thing doesn't work for me, so if you have the same problem here's a handy function you can use:

Code: [Select]
dkimadd() { [ "$1" != "" ] &&

mkdir /etc/opendkim/keys/$1 &&
opendkim-genkey -D /etc/opendkim/keys/$1/ -d $1 -s default &&
chown -R opendkim: /etc/opendkim/keys/$1 &&
mv /etc/opendkim/keys/$1/default.private /etc/opendkim/keys/$1/default &&
echo "default._domainkey.$1 $1:default:/etc/opendkim/keys/$1/default" >> /etc/opendkim/KeyTable &&
echo "*@$1 default._domainkey.$1" >> /etc/opendkim/SigningTable &&
echo $1 >> /etc/opendkim/TrustedHosts &&
cat /etc/opendkim/keys/$1/default.txt >> /var/named/$1.db
}

add it to your server .bashrc for extra handiness, use it thusly:

 dkimadd <domain>