Introduction
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.
Procedure
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Open
/usr/local/cpanel/Cpanel/RSA/Constants.pm
in your preferred text editor. - Locate the following line.
$DEFAULT_KEY_SIZE = 2048;
- Change the value to
1024
.$DEFAULT_KEY_SIZE = 1024;
- Save the changes and exit the text editor.
- Use the
dkim_keys_uninstall
script to uninstall the DKIM keys for the cPanel user./usr/local/cpanel/bin/dkim_keys_uninstall $USERNAME
Please note that "$username" must be replaced with the cPanel user's username. - Use the
dkim_keys_install
to reinstall the DKIM keys./usr/local/cpanel/bin/dkim_keys_install $USERNAME
Please note that "$username" must be replaced with the cPanel user's username.