By default, cPanel generates 2048-bit DKIM keys, which are more secure than 1024-bit keys. However, while unsupported, it is possible to generate a 1024-bit DKIM key in cPanel.
Please note that we do not advise that you reduce the security of any aspect of your server, including making less secure DKIM keys.
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
/usr/local/cpanel/Cpanel/RSA/Constants.pmin your preferred text editor.
- Locate the following line.
$DEFAULT_KEY_SIZE = 2048;
- Change the value to
$DEFAULT_KEY_SIZE = 1024;
- Save the changes and exit the text editor.
- Use the
dkim_keys_uninstallscript to uninstall the DKIM keys for the cPanel user.
/usr/local/cpanel/bin/dkim_keys_uninstall $USERNAMEPlease note that "$username" must be replaced with the cPanel user's username.
- Use the
dkim_keys_installto reinstall the DKIM keys.
/usr/local/cpanel/bin/dkim_keys_install $USERNAMEPlease note that "$username" must be replaced with the cPanel user's username.