SOLVED Exim how to override default dkim_selector

Gino Viroli

Well-Known Member
Oct 2, 2007
91
10
58
cPanel Access Level
Root Administrator
My domain is sending mails from two different VPS, cPanel/WHM is installed on both VPS.

The domain is also using a third party DNS, (not cPanel/WHM DNS)

I want to enable DKIM for outgoing mail authentication on both VPS, hence I went on both cPanel/WHM and turned on "Email > Authentication > DKIM" on both.

Both cPanel asked me to add to the DNS of my domain the following record:

default._domainkey.mydomain.com IN TXT "v=DKIM1; k=rsa; p=...

The problem is that obviously the two private/public key created on the two VPS by cPanel are different, but the DNS record to add to mydomain.com comes with the same name "default._domainkey"

Is there a way to tell cPanel (or at least Exim) to use a different DNS record for DKIM?
In this way I could set:
- VPS1 to send outgoing mail dkim signed that tells the recipient to look at the DNS record "myselector1._domainkey" instead of "default._domainkey"
- VPS2 to send outgoing mail dkim signed that tells the recipient to look at the DNS record "myselector2._domainkey" instead of "default._domainkey"
- Add to my domain's DNS both records:
myselector1._domainkey.mydomain.com IN TXT "v=DKIM1; k=rsa; p=somepublickey1...
myselector2._domainkey.mydomain.com IN TXT "v=DKIM1; k=rsa; p=somepublickey2...


Can I simply change dkim_selector in one of my VPS at "WHM > Service Configuration > Exim Configuration Manager > Advanced Editor"?

BTW: there is also a feature request for this: DKIM support for custom selector
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,251
313
Houston
Hello,

What might be easiest to do is have cPanel generate the DKIM with the default selector on one server, then transfer the private + public keys to the other server which are located at:
Code:
/var/cpanel/domain_keys/private/
/var/cpanel/domain_keys/public/
cPanel won't automatically generate any DKIM with a different selector if this is something you need I would suggest voting on the request.

Thanks!
 
  • Like
Reactions: Gino Viroli

tui

Well-Known Member
Jun 15, 2007
87
7
58
Mexico
cPanel Access Level
Root Administrator
Hello,

What might be easiest to do is have cPanel generate the DKIM with the default selector on one server, then transfer the private + public keys to the other server which are located at:
Code:
/var/cpanel/domain_keys/private/
/var/cpanel/domain_keys/public/
cPanel won't automatically generate any DKIM with a different selector if this is something you need I would suggest voting on the request.

Thanks!
Is there any other way to achieve this? Im on the same situation but i only have root access only to one cpanel server, the other server is just a relay service (but its also cpanel and i have cpanel access) so i cannot transfer keys from/to one server to another as this post suggest