DKIM error with Virtualmin Generated dkim-filter.conf


I have been using Virtualmin on my shared server for the past few years and for the first time I’m having problems. Specifically with DKIM that was introduced with 3.81.

OS is Ubuntu 8.04LTS 32bit
MTA is Postfix 2.5.1

Enabling DKIM appeared to be successful and enabled DKIM for all 311 virtual domains. However the service wouldn’t start. After attempting to start it manually I get the following error:

Starting DKIM Filter: dkim-filter: /etc/dkim-filter.conf: configuration error at line 10: unrecognized parameter

This is the line that contains the domain names. If I then delete this line and manually add some domains then the service starts.

Any ideas? Perhaps 311 domains might be too many to have in the config?

Best regards,

Is there any chance you could show us exactly what is on lines 9 and 10?

It shouldn’t matter how many domains you have, in theory :slight_smile: But maybe there’s something special about the way they’re formatted that’s causing problems.


Hi Eric,

Line 9 is the Domain entries so it’s really long! and Line 10 is the KeyFile entry.

Even if I comment out the KeyFile entry it will still return the same error. No obvious formatting errors that I can see. But it’s strange that if I manually add a few domains it works. But if I edit the config created by VirtualMin and remove all but one entry it will throw the error again.

For what it’s worth here’s a screenshot as I’d rather not paste the contents here:

Thanks in advance for any help.

I looked into this, and found that the dkim-milter program Virtualmin calls only supports lines up to 1024 characters long … even if they are commented out :frowning:

The work-around is to change the line to :

Domain *

And then restart DKIM milter. However, this might need to be-done after you add each new domain to Virtualmin.

The next release will fix this automatically.

Thank you Jamie,

I look forward to the update. I can confirm that it will need to be done after adding a new domain or even updating an existing domain or mailbox.

Thank you again.



The line ‘Domain *’ is causing problem when mail isn’t send throgh the SMTP server (like from a PHP script, cronjob, etc…). The milter will reject the mail " milter-reject: END-OF-MESSAGE from localhost[]: 4.7.1 Service unavailable - try again later"

This is fixed when i comment out the line “Domain *”

But it’s driving me crazy, coz I have to do it several times a week…

I just realized that this was the cause of problems too, and have added code to Virtualmin to not add this directive. This will be included in the 3.84 release.