Automatically install DomainKeys on new accounts in cPanel

DomainKeys is an e-mail authentication system designed to verify the DNS domain of an e-mail sender and the message integrity. cPanel supports this but the feature is disabled by default on new accounts. If you want to make it easy on your users and enable this automatically you just need to add a few lines to your postwwwacct file.

The following code runs the domain_keys_installer script at then end of a new account creation, thus enabling DomainsKeys for all new accounts.

Create (if not already there) /scripts/postwwwacct then copy and past the following code into the file:

$opts = array();
$argv0 = array_shift($argv);

while(count($argv)) {
 $key = array_shift($argv);
 $value = array_shift($argv);
 $opts[$key] = $value;
shell_exec("/usr/local/cpanel/bin/domain_keys_installer " . $opts['user']);

DomainsKeys will now be installed on all new accounts you create.

One thought on “Automatically install DomainKeys on new accounts in cPanel

  1. Pingback: How to enable SPF and DomainKeys by default? - Page 3 - cPanel Forums

Leave a Reply