{"id":134,"date":"2010-12-12T19:41:42","date_gmt":"2010-12-12T19:41:42","guid":{"rendered":"http:\/\/www.linuxmaster.tk\/?p=134"},"modified":"2011-01-12T06:50:07","modified_gmt":"2011-01-12T06:50:07","slug":"setting-up-of-dkim-key-in-a-cpanel-server","status":"publish","type":"post","link":"https:\/\/linuxmaster.in\/?p=134","title":{"rendered":"Setting  Up  Of  DKIM  key  in  A  Cpanel  Server"},"content":{"rendered":"<p><strong><br \/>\n<\/strong><\/p>\n<div>\n<div><span style=\"line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small;\"><strong>Check if exim is compiled with DKIM support enabled.<\/strong><\/span><\/div>\n<div><strong><br \/>\n<\/strong><\/div>\n<div><span style=\"line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small;\"><code><strong>root@server <\/strong><\/code><code><strong># \/usr\/sbin\/exim -dd 2&gt;&amp;1 | grep Experimental_DKIM<\/strong><\/code><\/span><\/div>\n<div><span style=\"line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small;\"><\/p>\n<table>\n<tbody>\n<tr>\n<td><code><strong>Support <\/strong><\/code><code><strong>for<\/strong><\/code><code><strong>: crypteq iconv() IPv6 PAM Perl OpenSSL Content_Scanning Old_Demime Experimental_SPF Experimental_SRS<\/strong><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/span><\/div>\n<div><strong><br \/>\n<\/strong><\/div>\n<div><strong><br \/>\n<\/strong><\/div>\n<div><span style=\"line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small;\"><strong>Generate the SSL keys.<\/strong><\/span><\/div>\n<div><strong><br \/>\n<\/strong><\/div>\n<div><span style=\"line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small;\"><\/p>\n<div id=\"highlighter_467795\">\n<div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code><strong>1<\/strong><\/code><\/td>\n<td><code><strong>cd<\/strong><\/code><strong> <\/strong><code><strong>\/usr\/<\/strong><\/code><code><strong>local<\/strong><\/code><code><strong>\/cpanel\/etc\/exim<\/strong><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p><\/span><\/div>\n<div><strong>openssl genrsa -out dkim.key 1024<\/strong><\/div>\n<div>\n<div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><code><strong>openssl rsa -<\/strong><\/code><code><strong>in<\/strong><\/code><strong> <\/strong><code><strong>dkim.key -out dkim.public -pubout -outform PEM<\/strong><\/code><\/p>\n<p><strong> <\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong>You will find two keys,\u00a0dkim.key &amp;\u00a0dkim.public<\/strong><\/p>\n<p><strong>Open\u00a0dkim.public and copy the contents excluding the \u2013Begin\u2013 and \u2013End\u2013\u00a0section. This is your DKIM key. \u00a0Now open exim configuration file and append the below entries under the section \u2018remote_smtp\u2019<\/strong><\/p>\n<p><strong><br \/>\n<\/strong><\/p>\n<div>\n<div><strong>Sample exim.conf file<\/strong><\/div>\n<\/div>\n<div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-family: monospace;\"><strong><br \/>\n<\/strong><\/span><\/td>\n<td><code><strong>remote_smtp:<\/strong><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-family: monospace;\"><strong><br \/>\n<\/strong><\/span><\/td>\n<td><code><strong>driver = smtp<\/strong><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-family: monospace;\"><strong><br \/>\n<\/strong><\/span><\/td>\n<td><span style=\"font-family: monospace;\"><strong><br \/>\n<\/strong><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-family: monospace;\"><strong><br \/>\n<\/strong><\/span><\/td>\n<td><code><strong>dkim_domain=your_domain_name.com<\/strong><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-family: monospace;\"><strong><br \/>\n<\/strong><\/span><\/td>\n<td><code><strong>dkim_selector=mail<\/strong><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-family: monospace;\"><strong><br \/>\n<\/strong><\/span><\/td>\n<td><code><strong>dkim_private_key=\/usr\/<\/strong><\/code><code><strong>local<\/strong><\/code><code><strong>\/cpanel\/etc\/exim\/dkim.key<\/strong><\/code><code><strong>#path to the\u00a0dkim.key key.<\/strong><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-family: monospace;\"><strong><br \/>\n<\/strong><\/span><\/td>\n<td><code><strong>interface = ${<\/strong><\/code><code><strong>if<\/strong><\/code><strong> <\/strong><code><strong>exists {\/etc\/mailips}{${lookup{$sender_address_domain}lsearch*<\/strong><\/code><\/p>\n<p><code><strong>{\/etc\/mailips}{$value}{}}}{}}<\/strong><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-family: monospace;\"><strong><br \/>\n<\/strong><\/span><\/td>\n<td><code><strong>helo_data = ${<\/strong><\/code><code><strong>if<\/strong><\/code><strong> <\/strong><code><strong>exists {\/etc\/mailhelo}{${lookup{$sender_address_domain}lsearch*<\/strong><\/code><\/p>\n<p><code><strong>{\/etc\/mailhelo}{$value}{$primary_hostname}}}<\/strong><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-family: monospace;\"><strong><br \/>\n<\/strong><\/span><\/td>\n<td><code><strong>{$primary_hostname}}<\/strong><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><strong><br \/>\n<\/strong><\/p>\n<p><strong><br \/>\n<\/strong><\/p>\n<div>\n<div><span style=\"line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small;\"><strong>In WHM, open DNS editor for the particular domain and add the TXT entry with DKIM key like below.<\/strong><\/span><\/div>\n<div><strong><br \/>\n<\/strong><\/div>\n<div><span style=\"line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small;\"><\/p>\n<table>\n<tbody>\n<tr>\n<td><code><strong>mail._domainkey.rosesource.com. IN TXT\u00a0\"<\/strong><\/code><code><strong>v<\/strong><\/code><code><strong>=DKIM1; g=*; k=r<\/strong><\/code><\/p>\n<p><code><strong>sa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDv4PSEM9P<\/strong><\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/span><\/div>\n<div><span style=\"line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small;\"><strong>Here p=the_key_you_have_copied_from_dkim.public<\/strong><\/span><\/div>\n<div><strong><br \/>\n<\/strong><\/div>\n<div><span style=\"line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small;\"><strong>Then restart exim and named.<\/strong><\/span><\/div>\n<div><strong><br \/>\n<\/strong><\/div>\n<div><span style=\"line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small;\"><strong>You can check it using the site \u00a0http:\/\/www.brandonchecketts.com\/emailtest.php.<\/strong><\/span><\/div>\n<div><\/div>\n<div><span style=\"line-height: normal; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: small;\"><strong>Also there is an option in cpanel &gt; Email Authentication &gt; DKIM Keys<br \/>\n<\/strong><\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Check if exim is compiled with DKIM support enabled. root@server # \/usr\/sbin\/exim -dd 2&gt;&amp;1 | grep Experimental_DKIM Support for: crypteq iconv() IPv6 PAM Perl OpenSSL Content_Scanning Old_Demime Experimental_SPF Experimental_SRS Generate the SSL keys. 1 cd \/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,\u00a0dkim.key &hellip; <a href=\"https:\/\/linuxmaster.in\/?p=134\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Setting  Up  Of  DKIM  key  in  A  Cpanel  Server&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-134","post","type-post","status-publish","format-standard","hentry","category-linux-server-administration"],"_links":{"self":[{"href":"https:\/\/linuxmaster.in\/index.php?rest_route=\/wp\/v2\/posts\/134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxmaster.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxmaster.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxmaster.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxmaster.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=134"}],"version-history":[{"count":6,"href":"https:\/\/linuxmaster.in\/index.php?rest_route=\/wp\/v2\/posts\/134\/revisions"}],"predecessor-version":[{"id":137,"href":"https:\/\/linuxmaster.in\/index.php?rest_route=\/wp\/v2\/posts\/134\/revisions\/137"}],"wp:attachment":[{"href":"https:\/\/linuxmaster.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxmaster.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxmaster.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}