DKIM always generates 2048-bit keys regardless of Virtualmin settings

Been trying to set up DKIM mail for a couple hours now. Common solution on the site calls for setting the system to generate 1024-bit keys, but I still get

I tried reloading configuration and restarting Webmin, using the "Force new private key" and deleting the dkim.key file manually.

rndc: reload failed: ran out of space

Is there a proper solution to this problem at this time?

Status: 
Active

Comments

yes it is hardcoded to 2048 and doesnt care about the global virtualmin ssl key strengt setting...

i saw that this will be fixed in the next version so that we can change the options in the dkim panel, but for now you can patch it like this:

# sed -i 's/t=y;/t=s;/' /usr/libexec/webmin/virtual-server/dkim.cgi # sed -i 's/t=y;/t=s;/' /usr/libexec/webmin/virtual-server/dkim-lib.pl # sed -i 's/my \$size = 2048;/my \$size = 1024;/' /usr/libexec/webmin/virtual-server/dkim-lib.pl

you must do all 3 commands, then "force regenerate key" in dkim, also make sure your doman dns TXT records got updated to the new key

This issue is still not resolved and results in mails going to spam-box of some users because their ISP's DNS does not work with DKIM size larger than 1024. Also the solution above does not work. Thank you in advance.

mn3250 - which Virtualmin version are you running?

Thank you for your answer. Virtualmin 6.00.gpl.

Have you re-generated the DKIM key for the problem domains recently? If it was enabled when you had an older Virtualmin version, the old key would still be in use.

I have re-generated new DKIM keys. The new ones are still generatred as 2048-bit.

I assume that on the page in Virtualmin where you enable DKIM and it prompts for the key size, you entered 1024 ?

Correct. To make sure also changed the key name. Looking at /usr/libexec/webmin/virtual-server/dkim.cgi code, it is still hardcoded 2048.

Looking at the code, I can't see how this could happen. Which Virtualmin version are you running there?

issue still. DKIM always generates 2048-bit keys regardless of Virtualmin settings 2020

Ilia's picture
Submitted by Ilia on Mon, 03/02/2020 - 02:07

keys regardless of Virtualmin settings 2020

What is 2020? A year or a key size?

DKIM always generates 2048-bit key

You need to set to Yes Force generation of new private key? option before saving, if you want your key to be regenerated.