Setting Up Of DKIM key in A Cpanel Server

Check if exim is compiled with DKIM support enabled.

root@server # /usr/sbin/exim -dd 2>&1 | grep Experimental_DKIM

Support for: crypteq iconv() IPv6 PAM Perl OpenSSL Content_Scanning Old_Demime Experimental_SPF Experimental_SRS

Generate the SSL keys.

1cd /usr/local/cpanel/etc/exim

openssl genrsa -out dkim.key 1024
openssl rsa -in dkim.key -out dkim.public -pubout -outform PEM

You will find two keys, dkim.key & dkim.public

Open dkim.public and copy the contents excluding the –Begin– and –End– section. This is your DKIM key.  Now open exim configuration file and append the below entries under the section ‘remote_smtp’

Sample exim.conf file


driver = smtp


dkim_private_key=/usr/local/cpanel/etc/exim/dkim.key#path to the dkim.key key.

interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*


helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*



In WHM, open DNS editor for the particular domain and add the TXT entry with DKIM key like below. IN TXT "v=DKIM1; g=*; k=r


Here p=the_key_you_have_copied_from_dkim.public

Then restart exim and named.

You can check it using the site
Also there is an option in cpanel > Email Authentication > DKIM Keys

2 thoughts on “Setting Up Of DKIM key in A Cpanel Server

  1. AltinSoft Bilisim

    If some one desires to be updated with most recent technologies afterward he
    must be visit this website and be up to date
    every day. usa Web hosting, vps server and dedicated servers services.
    High performence vps servers

  2. best breast pump

    I like the helpful info you provide in your articles.

    I’ll bookmark your blog and check again here frequently.
    I am quite sure I’ll learn many new stuff right here!
    Good luck for the next!


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.