The first thing to do is to install the package "Opendkim - DKIM Filter " in the "Features " menu.

Add a mail domain in menu "Mail Domains ". When adding, you need to check the box "Enable DKIM ".
Private and public keys for DKIM are generated in /etc/exim4/ssl/ folder and are named

note: on CentOS 6 the keys are generated in /etc/opendkim/keys/

  • We are interested in file with extension .txt, this contains TXT record which should be added to the [DNS] panel (

The contents of the file will be:

dkim._domainkey IN TXT `` v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCrKa4PQCLAbjeDO1QIcfFwtd5GojPl2suLjCJmL6l9Bc7nrRlvAlnLOQlQRH2A38UAUwvG3eyln9GbKbK8/Vmyu+xmhoWpGVP/PkaneMx1c/E0pN35DUK4cVuingeZRZWLNIkPTRKcNUWuFK4FN2IblA1z1PRUXNCfEWjUMPqkQidAQAB" ; ----- DKIM key dkim for  

dkim._domainkey - entered in the "Host " field

"` v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUA4GNADCBiQKBgQCrKa4PQCLAbjeDO1QIcfFwtd5GojPl2suLjCJmL6l9Bc7nrRlvlnLOlQRH2A38UAUwvG3eyln9GbKbK8/Vmyu+xmhoWpGVP/PkaneMx1c/E0pN35DUK4cVuingeZRZWLNIkPTRKcNUWuFK4FN2IblA1z1PRUXNCfEWjUMPqkQidAQAB" - is entered in the "Value" field, you can leave the double quotes for convenience.


** IMPOrTANT:** the key must be one line - if there are line breaks, you must copy the key into notepad and remove them to make one long line.

To check if the DKIM signature works is quite simple. You just need to send a letter from any mailbox of your domain to any third-party mail server and check the source code of the letter. The headers should contain the entry "dkim=pass". In the case of gmail or yandex signed letters are marked with special marks (see screenshot).


Updated Jan. 3, 2019