Step 1. Modify DKIM generator
a. Edit (as root) script file /opt/zimbra/libexec/zmdkimkeyutil and replace all ‘2048’ occurrences with ‘1024’.
This will allow creation of DKIM key with length 1024 and set it as default value.
nano /opt/zimbra/libexec/zmdkimkeyutil
replace all 3 ‘2048’ occurrences with ‘1024’ and then save and exit
Step 2. generate a new DKIM, replace example.com with your domain. Please note you’ll need to generate a DKIM for each domain
switch to zimbra user : su – zimbra
/opt/zimbra/libexec/zmdkimkeyutil -a -d example.com
Step 3. Retrieving the stored DKIM data for your domain – replace example.com with your domain
as zimbra user run command below;
/opt/zimbra/libexec/zmdkimkeyutil -q -d example.com
zimbra@example.com:~$ /opt/zimbra/libexec/zmdkimkeyutil -a -d example.com
DKIM Data added to LDAP for domain example.com with selector 0E9F184A-9577-11E1-AD0E-2A2FBBAC6BCB
Public key to enter into DNS:
0E9F184A-9577-11E1-AD0E-2A2FBBAC6BCB._domainkey IN TXT “v=DKIM1;=rsa;
p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDY5CBg15nZ2vYnRmrNub6Jn6ghQ2DXQbQgOJ/E5IGziUYEuE2OnxkBm1h3jived21uHjpNy0naOZjLj0xLyyjclVy1chrhSbsGAhe8HLXUsdXyfRvNTq8NWLsUnMEsoomtJCJ
/6LYWYU1whOQ9oKZVAwWHSovAWZpByqNMZmFg7QIDAQAB” ; —– DKIM 0E9F184A-9577-11E1-AD0E-2A2FBBAC6BCB for example.com
Keep reading