Jump to Main Content
Content > Internet > DomainKeys

DomainKeys allows authentication of sent emails via a key-signing methodology. One of several anti-spam methodologies, this article covers how to implement it on cPanel servers.

DomainKeys Info: Wikipedia: DK DKIM | DKIM.org 

DomainKeys should be standard these days for ISPs. A number of larger sites are now using DomainKeys to verify incoming emails and using them for outgoing emails so others may verify them. The list includes Google and Yahoo.


Installation must be done on a domain basis. To install DomainKeys on a specific domain:

  1. You need to be running RELEASE or CURRENT of cPanel 11 (as of Oct 2007)
  2. Run the script
  3. /usr/local/cpanel/bin/domain_keys_installer username

    Where username is the cPanel account username

If you get an error similar to “Domain keys are not installed on this machine.”, either the server isn't running the latest release or current version of cPanel or you have not converted yet to maildir. Maildir conversion is required before installing DomainKeys. You can find an article on converting to maildir on cPanelConfig.com. This builds a key and puts the appropriate key into DNS. One of the articles suggested that we add another entry of _domainkey “t=y; o=-” but we'll have to review that as my tests say it works ok as is.

Multiple Existing Domains

Someone wrote a simple bash script that will parse all the cpanel users and then run the installation for each of them.

for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/domain_keys_installer $i ;done

Auto-Install on New Accounts/Domains

To setup cPanel so that it installs DomainKeys for new users, follow these instructions. Per one article, you can /scripts/postwwwacct and add:

my %OPTS = @ARGV;
my $user = $OPTS{’user’};
/usr/local/cpanel/bin/domain_keys_installer $user

and test it by creating a new account and see if it was setup. You can also send a test email to check-auth@verifier.port25.com.

You'll also want to run SPF as well as not all ISPs use/verify with DomainKeys.

Sources for this article: Installing DomainKeys on a cPanel server | DomainKeys on cPanel HowTo

Other Pages
Previous Page Search Engine Indexing and Submissions Flash Video for Web Sites Next Page
Comments are solely the opionion of the author and not to be construed as the opinion of anyone else.



(c) 2006-2007 - Mark Boyden
Privacy - Legal Stuff - Contacts