System Emails Fail DKIM

tgrand

Member
Jun 10, 2008
5
0
51
Recently setup DKIM and DMARC.
Emails from users come from mydomain.com and are passing, however, system emails are coming from hostname.mydomain.com and are failing.

How can I resolve this?
 

martin MHC

Well-Known Member
Sep 14, 2016
345
75
78
UK
cPanel Access Level
Root Administrator
Can you show us your (relevant:aka DMARC / DKIM) DNS values for the different domains? You need DNS entries for both "mydomain.com" and "hostname.mydomain.com" , I believe.
 

tgrand

Member
Jun 10, 2008
5
0
51
Before I do I can already say that spf is defined for the both mydomain.com as well as hostname.mydomain.com.
How is it even possible to have a domainkey for a hostname?

Values are below.. DNS hosted on Remote DNS server.

mydomain.com. IN TXT "v=spf1 mx a ptr:mydomain.com ~all"
baldr.mydomain.com. IN TXT "v=spf1 mx a ptr ~all"
_dmarc TXT "v=DMARC1; p=none; rua=mailto:[email protected]; ruf=mailto:[email protected];"
default._domainkey 14400 IN TXT "v=DKIM1; k=rsa; p=Very Large Key;"
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

Are your root notifications configured for delivery to an external email account (e.g. Gmail, Hotmail)? If so, you may need to update the contact address to an email account on the local cPanel server, and then setup a filter or forwarder to forward the notification emails to that external address. I encourage you to vote for the following feature request if you'd like to see an option to configure SMTP authentication for the root notifications:

Send cPanel Notifications via Authenticated SMTP Connection

Thank you.
 

QAZwsxED

Member
Oct 4, 2020
9
0
1
Australia
cPanel Access Level
Website Owner
I recently solved a similar issue.
Solution: manually add a Message-Id (note not a Message-ID) header then connect and send an email.
cPanel WHM adds a Message-ID header and re-arranges the 'h' record in the DKIM signature which invalidates it, causing a DKIM:fail in the recipients mailbox.