SMTP Relay/Mailer Server to use DKIM from WHM/cPanel

Operating System & Version
CentOS 7.6 (CloudLinux 7.8)
cPanel & WHM Version
v88.0.13

RyanR

Well-Known Member
Jul 22, 2020
46
6
8
London
cPanel Access Level
Root Administrator
Hi,

So we have had an issue with our hosting server where our emails were being blocked from the main server so we setup a SMTP Relay server with Postfix on it and it's working well...

The problem is any emails that get forwarded from our main server (running WHM/cPanel) aren't signed by DKIM because the DKIM tables exist on the main server, not the relay server...
  1. Is it possible to forward the DKIM signage across from the WHM/cPanel server to the SMTP server?
  2. If not, is there a way to hook / trigger a script to run when a domain is added/removed from a cPanel account?
The reason I ask about #2 is because surely a work around would be to transfer an copy (securely) of the DKIM tables from the main server to the relay server which would allow for the relay server to sign exactly the same as the main server.

I'd greatly appreciate some advice on this!

Regards
~ Ryan
 

RyanR

Well-Known Member
Jul 22, 2020
46
6
8
London
cPanel Access Level
Root Administrator
You note forwarded, to be specific here are you saying that all mail is signed except forwarded mail or no mail is signed that is sent from your cPanel server?
Hi Lauren,

If I disable the relay they are signed but as soon as I enable the relay they aren't signed so I assume they're signed when they get to the relay server but they lose this signing when they reach this server?

I'm not sure how I'm meant to be able to check.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
My hangup was the use of the word forward. You're meaning mail coming from your local server is not getting signed on the SMTP Relay. In that case, you need to most likely set up a milter on the postfix server to sign the email. This isn't something we can provide assistance with but the following may be helpful: