Force cPanel to always perform MX Lookup

kenneth-vkd

Active Member
Apr 1, 2017
31
1
8
Denmark
cPanel Access Level
DataCenter Provider
Hi
We are facing an issue where we host email for multiple clients. Some of these clients do business with each other and some of them even have an external spamfiltering solution as they do not want to use the one that comes with cPanel/WHM.
In case that two clients are on the same host, cPanel performs a local delivery and therefore the email never reaches the recipients external spamfiltering service.

Is there are way for us to always force cPanel SMTP to perform a lookup of the MX records and only perform local delivery if the recipients MX-record points directly to the server ifself?
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,012
647
263
Houston
cPanel Access Level
DataCenter Provider
Hi @kenneth-vkd

For all the domains that host their mail remotely, I would suggest doing one of the following (same result two different ways to get there)

1. Via CLI remove the domains with remote MX from /etc/localdomains and place them in /etc/remotedomains

2. From WHM>>DNS Functions>>Edit DNS Zone -> domain.tld at the very bottom "Email Routing for domain.tld set automatically detect configuration or remote mail exchanger to have them be remote.


Thanks!
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,012
647
263
Houston
cPanel Access Level
DataCenter Provider
Hi @brt


It's technically the only way to force a lookup like he's requesting and it works for local MX Entries. You do have a point though, it could cause deliverability issues if set to remote. If that option doesn't work because of the way that local deliveries work (two clients on the same server) it may not be possible to force a lookup.