New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

DKIMing

Started by olongapo, February 25, 2015, 07:10:33 PM

Previous topic - Next topic

olongapo

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:

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>