Prev Previous Post   Next Post Next
Old 5th March 2013, 09:39
misterm misterm is offline
Senior Member
Join Date: Aug 2005
Posts: 584
Thanks: 25
Thanked 8 Times in 7 Posts
Question amavis dkim enable

After a long fight i finally managed to get dkim signatures to work!
In fact this job is pretty simple:
After you generate the key file (in my case i had 3 key files for three different domains) use the showkeys command to display the key and create a TXT record in MyDns (just use the ISPConfig DNS Interface it will work), after that you have to wait for the changes to reflect on the internet.
I think 24 hours will be enough.

Here is how 50-user amanvisd conf file looks like:

#$enable_dkim_verification = 1;
$enable_dkim_signing = 1;
@dkim_signature_options_bysender_maps = (
{ '.' => { ttl => 21*24*3600, c => 'relaxed/simple' } } );
@mynetworks = qw( x.x.x.x/32);
dkim_key('', 'mail', '/var/db/dkim/');
dkim_key('', 'mail', '/var/db/dkim/');
dkim_key('', 'mail', '/var/db/dkim/');

Now lets cut this into pieces:

$enable_dkim_verification = 1;

I commented this out because i really dont need that amavisd to check the incoming mail for signatures because some useful mails might get spam flagged. If you really think that you will need this you can uncomment this line.

$enable_dkim_signing = 1;

This line enables dkim signing for outgoing mail.

@dkim_signature_options_bysender_maps = (
{ '.' => { ttl => 21*24*3600, c => 'relaxed/simple' } } );

This one sets some dkim signature properties like: hashing algorhitm and key's TTL. I recommend to leave this as it is unless you really know what you are doing.

Now the fun part is here:

@mynetworks = qw(;

Here is a list of hosts that are allowed to send mails thru you mail server, in other words the trusted networks for which amavisd will sign the emails. You have to add here the ip classes/addresses from where you will send your emails. In my case all the emails are sent by The Webmail interface (which uses the loopback address and a public ip address which belongs to my network's NAT Gateway ( , Notice the /32 mask which indicates thats only one ip address and not the whole class /24). If you are using your gateway/router as mail server too you will onlu have to add private ip class which your router is serving on (ie:

In my case the problem was that i have separate machines for the mail server and gateway and i didnt had a record for my gateway's ip address and amavisd refused to sign my emails.

Anyway now all its working like it should. The funny part is that the stupid Yahoo still marks my messages as spam but this is just matter of time until their spam filters will gather enough information and put my hosts on whitelist.

Hope this will help!

Later Edit: As i was saying some time ago... Yahoo was still marking my messages as spam. A few days ago i did another check, and... surprise... all of my messages got straight into Yahoo's Inbox. Thats so good news... so for those which are disapointed after setting up DKIM signs and the messages end in spam folder don't worry, its just a matter of time... so all you have to do is to wait.
Is that this tutorial is still relevant?
For the date of online.
Thank you for écalairer because I want to achieve for several areas, but it does not work, as I think.
Thank you for your help
ISPConfig, the panel fantastic ,
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
amavis dkim problem ciprianflorea Installation/Configuration 16 7th September 2012 18:35
how to enable logging for amavis Ovidiu General 2 13th November 2009 17:06
Installation -- pcre_exec.c:403: internal compiler error: Segmentation fault zerman Installation/Configuration 2 24th September 2008 00:58
PHP install problem SgtM Installation/Configuration 6 7th April 2007 18:45
ERROR: The PHP binary coming with ISPConfig does not work properly on your system! micko_escalade Installation/Configuration 35 30th March 2007 12:31

All times are GMT +2. The time now is 23:06.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.