DomainKeys Install

Here is a little script that will add domainkeys to all cpanel user accounts.

#!/bin/bash
for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/domain_keys_installer $i ;done
cd /var/named
localdomains=$(cat /etc/localdomains | grep '^[^.]*\.[^.]*$' | uniq -u)
for i in $localdomains
do
echo "_domainkey IN TXT "t=y; o=~; n=Interim Sending Domain Policy; r=root@$HOSTNAME"" >> $i.db
done
wget http://layer3.liquidweb.com/updateserial.pl -O /var/named/updateserial.pl
cd /var/named
perl /var/named/updateserial.pl .

chmod +x scriptname.sh
./scriptname.sh

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.