cPanel & WHM Version 92 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!
This object is in archive! 

Allow sysadmins to configure a list of e-mail gateways that should be detected as local.

Monarobase shared this idea 6 years ago
Completed

We use an external antispam cluster and when we manually set the MX servers cPanel automaticaly detects them as an external server and not as a local server.


We would like to have the ability to configure a list of MX gateways that should be detected as local gateways in the cPanel MX settings page.


When you set MX servers that are not the servers hostname, cPanel detects them as distant servers. cPanel runs a detection on very update to the MX records even if the configuration is set to local and not autodetect.


If we had the abilty to configure our e-mail gateway hostnames to be detected as local delivery this wouldn't be an issue any more.

Best Answer
photo

I have not yet been able to reproduce the behavior you've mentioned. As a result, I'm going to need more information from you on how to replicate the behavior. My testing:


  1. Generate account "mytest.com"
  2. TEST: Edit DNS for it, leave "LOCAL" explicitly selected and leave MX at "mytest.com." (since you said anything that's "not the server hostname")
  3. RESULT: Domain properly in /etc/localdomains
  4. TEST: "LOCAL" selected, MX set to remote host "yahoo.com."
  5. RESULT: Despite a remote MX set, the "LOCAL" override worked and the domain was properly in /etc/localdomains
  6. TEST: "AUTO" selected, MX set to remote host "yahoo.com."
  7. RESULT: Auto detected remote, domain properly exists in /etc/remotedomains
  8. Setup /etc/hosts to force yahoo.com to resolve to an IP on the server
  9. TEST: "AUTO" selected, MX set to remote host "yahoo.com." that's forcibly resolving to my server
  10. RESULT: Auto detected local (since I forced the resolver that way), and properly set the domain in /etc/localdomains

Basically, in every use case I can think of off the top of my head, the system is working perfectly. I'll need explicit steps to follow on how to replicate the problem you're mentioning.


Note that the concept of a "local" domain means that Exim as run by cPanel on the local box itself should be responsible for the message. This is considered true when the MX record ultimately points to a local IP.


If the MX record ultimately points to an IP address not seen in "ifconfig", then it's deemed that the local Exim daemon is not responsible and mail is relayed off accordingly to the remote MX.


If your definition of local/remote is different, I will need that explanation as well so that I better understand the situation.


As it stands, I can only reproduce success where items that should be local are set local, and thinks that should be remote are set remote.


UPDATE: 2014-09-16

After your further clarification on your intended use, the behavior you're looking for is actually already within the product.


WHM -> IP Functions -> Configure Remote Service IPs


Add the IP addresses of whatever you wish to be forced as "Local" detection into that box.


This generates/maintains the file "/etc/ips.remotemail" which determines the IPs that, if an MX record resolves to them, will be forced as Local handling.

Comments (4)

photo
1

I have not yet been able to reproduce the behavior you've mentioned. As a result, I'm going to need more information from you on how to replicate the behavior. My testing:


  1. Generate account "mytest.com"
  2. TEST: Edit DNS for it, leave "LOCAL" explicitly selected and leave MX at "mytest.com." (since you said anything that's "not the server hostname")
  3. RESULT: Domain properly in /etc/localdomains
  4. TEST: "LOCAL" selected, MX set to remote host "yahoo.com."
  5. RESULT: Despite a remote MX set, the "LOCAL" override worked and the domain was properly in /etc/localdomains
  6. TEST: "AUTO" selected, MX set to remote host "yahoo.com."
  7. RESULT: Auto detected remote, domain properly exists in /etc/remotedomains
  8. Setup /etc/hosts to force yahoo.com to resolve to an IP on the server
  9. TEST: "AUTO" selected, MX set to remote host "yahoo.com." that's forcibly resolving to my server
  10. RESULT: Auto detected local (since I forced the resolver that way), and properly set the domain in /etc/localdomains

Basically, in every use case I can think of off the top of my head, the system is working perfectly. I'll need explicit steps to follow on how to replicate the problem you're mentioning.


Note that the concept of a "local" domain means that Exim as run by cPanel on the local box itself should be responsible for the message. This is considered true when the MX record ultimately points to a local IP.


If the MX record ultimately points to an IP address not seen in "ifconfig", then it's deemed that the local Exim daemon is not responsible and mail is relayed off accordingly to the remote MX.


If your definition of local/remote is different, I will need that explanation as well so that I better understand the situation.


As it stands, I can only reproduce success where items that should be local are set local, and thinks that should be remote are set remote.


UPDATE: 2014-09-16

After your further clarification on your intended use, the behavior you're looking for is actually already within the product.


WHM -> IP Functions -> Configure Remote Service IPs


Add the IP addresses of whatever you wish to be forced as "Local" detection into that box.


This generates/maintains the file "/etc/ips.remotemail" which determines the IPs that, if an MX record resolves to them, will be forced as Local handling.

photo
1

Hello, the idea is to have a list of mx servers that are not in ifconfig that are to be recognised as if they were in ifconfig when automaticaly choosing between local and distant.


When you have an external antispam gateway the external gateway isn't in ifconfig, it recieves all e-mail, scans it and forwards it to the cpanel server managing the e-mail for that domain. The cpanel server has to be set to local.


A webhost might use the external gateway for all incomming e-mail or just for some accounts, in both cases he knows that if the gateway's mx servers are set then e-mail should be set to local.


My feature request is to have a setting allowing hosts to manage à list of gateways that aren't in ifconfig that the automatic setting would recognize as local.


I will test again about the issue I had with the dns reverting to automatic after being changed. I would like to be able to tell my customers to set their mx to mx1.mygateway and mx2.mygateway without telling them to make sure they are not on automatic.


There are lots of gateways that work like this so detecting mx1.mygateway and mx2.mygateway as local when the automatic detection is run would be usefull for alot of hosts.

photo
1

I've just checked, here is how I reproduce the issue :


1) Select domain and check that Email Routing is set to Local Mail Exchanger

2) Click on edit and change mydomain.tld to mx1.mygateway.tld


This changes Email routing to Automatic which detects my e-mail gateway as not being in ifconfig and sets Email routing to distant.


I've created a seperate feature request for fixing this.


This feature request is only for having a list of external mx servers that the automatic setting should detect as neeting the local setting.

photo
1

After your further clarification on your intended use, the behavior you're looking for is actually already within the product.


WHM -> IP Functions -> Configure Remote Service IPs


Add the IP addresses of whatever you wish to be forced as "Local" detection into that box.


This generates/maintains the file "/etc/ips.remotemail" which determines the IPs that, if an MX record resolves to them, will be forced as Local handling.

Replies have been locked on this page!