Enabling DKIM milter in Virtualmin

To enable DKIM signing of outgoing email messages, follow these steps :

  1. Login to Virutalmin as root and go to Email Messages -> DomainKeys Identified Mail
  2. Change Signing of outgoing mail enabled? to Yes.
  3. In the Selector for DKIM record name field enter a short name that you will use to identify the signing key. This is typically just the current year, like 2010. Do NOT enter default, as this can trigger a bug in the current Virtualmin release which deletes the /etc/default directory!
  4. Click the Save button.

Assuming all goes well, Virtualmin will report the steps taken to configure and enable DKIM.

Only virtual servers that have both the DNS and email features enabled will have DKIM activated, as the mail server needs to be setup to use a private signing key whose corresponding public key is added to DNS.

By default, Virtualmin will also configure the DKIM milter to verify incoming email that has the proper signatures. DKIM-signed messages where the signature is incorrect or cannot be checked with a DNS lookup will be bounced or delayed. If you want to disable verification, set the Verify DKIM signatures on incoming email? option to No.

To turn off DKIM signing completely, just do the following :

  1. Login to Virutalmin as root and go to Email Messages -> DomainKeys Identified Mail
  2. Change Signing of outgoing mail enabled? to No.
  3. Click Save.

This will remove the public key from all domains, and stop your mail server from signing messages with the DKIM milter.

NOTES:
Common problems:

  1. Check if you have SPF, DKIM and DMARC records and if they are properly set
  2. Check if you have rDNS
  3. Check if your domain or IP is blacklisted
  4. From 1 to 3 plus several other settings can be checked with:
    http://mxtoolbox.com/SuperTool.aspx
  5. Check what services are active and their ports especially dovecot: http://www.cyberciti.biz/faq/how-do-i-find-out-what-ports-are-listeningo…

NOTES:
For rDNS should be easy to sort. Best and easiest solution would be to use the hostname (either way it should be FQDN), so if your hostname is “myserver.domain.tld” then check if you have in your DNS records “myserver.domain.tld. IN A your.server.IP.address”. If you are missing this record be sure to add it before you proceed to set rDNS. Once done go to your host control panel and set rDNS to “myserver.domain.tld”.

Tools like mxtoolbox.com should give you some info if there is a problem, another option is intodns.com but it will check only DNS (there are other solutions just use google). To test email only you can use https://www.unlocktheinbox.com/mail-tester . One thing you must know, every single thing what is not properly set or defined, it will increase spam score of your emails and more problems you have it will be easier for emails to end in spam or be rejected by receiver.

NOTES:
You can enable dmarc if you go virtualmin – domain – server configuration and click dns options. There you scroll down and click enabled on DMARC record enabled? also you can change policy there. You may perhaps wait 24 hours to apply this as its dns which could take time a bit.

NOTES:
I do see your point but I am hosting sites with emails without rDNS - that does not need to be concerned at all

Well based on RFC1912 we have:

2.1 Inconsistent, Missing, or Bad Data

Every Internet-reachable host should have a name.  The consequences
of this are becoming more and more obvious.  Many services available
on the Internet will not talk to you if you aren’t correctly
registered in the DNS.

Make sure your PTR and A records match.  For every IP address, there
should be a matching PTR record in the in-addr.arpa domain.  If a
host is multi-homed, (more than one IP address) make sure that all IP
addresses have a corresponding PTR record (not just the first one).
Failure to have matching PTR and A records can cause loss of Internet
services similar to not being registered in the DNS at all.  Also,
PTR records must point back to a valid A record, not a alias defined
by a CNAME.

It is highly recommended that you use some software
which automates this checking, or generate your DNS data from a
database which automatically creates consistent data…So please read it you will find a lot of information there about rDNS.

For the rest there is difference between helping and hand holding and i will not do the later. If someone dont want to spend few minutes on google then he or she dont deserve any attention and if you want to do differently please be my guest, i’m sure no one will stop you.

P.S. Stop telling people wrong information, there are rules you must follow so instead of teaching people wrong things lets educate them to properly follow the rules.

Diabolico
https://www.virtualmin.com/node/41321

– I often come to the conclusion that my brain has too many tabs open. –
Failing at desktop publishing & graphic design since 1994.