How can we help?

Watch this space: Upcoming Help Centre Migration


Multiple Domains with DKIM

Stewart -


I want to use multiple DKIM's with multiple domains on my mail server.


  • atmail mail server


The Web admin page only allows one domain with DKIM to be specified.


Please note, management of multiple DKIM's will not be accessible from the Web interface. It is however recommended you have DKIM 'ON' and provide details for ONE of your domains to satisfy the web page requirements on the Webadmin->Services->SMTP settings page.

  1. Change into the new DKIM directory and create your public and private keys for your domains:
    % cd /etc/exim/dkim/
    % openssl genrsa -out 1024 -outform PEM
    % openssl rsa -in -out -pubout -outform PEM
    % openssl genrsa -out 1024 -outform PEM
    % openssl rsa -in -out -pubout -outform PEM

    To avoid confusion with the .pem files, create a pub (public keys) directory and move the .com.pems into it.

    % mkdir pub ; mv pub/
  2. Change ownership of files and directory to atmail
    % chown -R exim:exim /etc/exim/dkim/*
  3. DKIM requires a TXT record that is to be published in the domains DNS records. A TXT record in regards to DKIM requires two fields: a name/selector field, and a text/value field. A common practice is to use the date for the 'selector' that is associated with the domain.

    For example, a selector of mail, used with our domain, the entry should look like the following:

    The TXT record uses the public key you made earlier to populate the 'p=' field. Open your domains public-key file with any editor of your choice. The entire file will look like the following:

     % vim 
    -----BEGIN PUBLIC KEY-----
    -----END PUBLIC KEY-----

    Carefully manually remove the header, footer and any line breaks as the TXT record must be submitted as a single line as per below. 

     % IN TXT "v=DKIM1 k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDi65c5K5Pp7bh/T7icab1v0fLQ7sfqNVWezBqhgljfVbH3Nn6nhVW+1l4tAPJUmSssssqFfL+Nx8D1YsPdzralcoMLp0Y3zRLCRBJ9dfgnBJmMwCp+IBW8MjGZa11OV8nIUBp0goG0NDS4UTDmtmecRRS0eWer3fA03ooRQgXRpwIDAQAB"
  4. Update your domains DNS records.

  5. Verify your DNS TXT record is working using the following:

  6. Restart exim services for the configuration to take affect.
    % systemctl restart exim
  7. To test DKIM, send an email and verify by inspecting the headers.


Contact our support team

+61 (7) 5357 6605