Add the new domain through the iredadmin panel –


1. Generate domain keys for the new domain:

amavisd-new genrsa /var/lib/dkim/

2. Edit the amavis conf file:

vim /etc/amavis/conf.d/50-user

Change @local_domains_maps = 1; to:

@local_domains_maps = ['.'];

Also add the following line below “# Add dkim_key here”:

dkim_key("", "dkim", "/var/lib/dkim/");

3. Restart amavis:

/etc/init.d/amavis restart

4. Show the new domain key to add to DNS:

amavisd-new showkeys

; key#2, domain, /var/lib/dkim/ 3600 TXT (
"v=DKIM1; p="

Copy the resultant domain key to as a TXT record (remove all quotation marks) e.g.
v=DKIM1; p=xxxxxxxxxxxxxxxxxxxxxxxxxxCBiQKBgQDI7mVZUl7C2OE/7O3NBSyuLANPwfZSk8BdQiGlBe3uzxxxxxxxxxxxxxxxxxxxxxx45aT4watrSf3R7kkXBVtrhS1mMwEXxqMy+9b9AMJN43GU/oD2MoNBPklp2tWv1mViCMSl9j9k1znK0dKcbANtmg38xxxxxxxxxxxxxxxx


amavisd-new testkeys

This should show:

TESTING#2: => pass

If the above test fails, perform a dig to make sure TXT record has propagated:

dig -t txt

Also, use to verify emails are being signed.

Written by Matt Cooper
Hi, I'm Matt Cooper. I started this blog to pretty much act as a brain dump area for things I learn from day to day. You can contact me at: