API check alwaysaccept for local mail
Hey All.
I have been attempting to write an script to help maintain our transport rules on our mail scanning servers and have hit a problem.
I have configured the Remote Mail Server IPs in WHM but noted that when running the cpapi2 command utility, I noted that the result has alwaysaccept as being 0, as follows:
From within Cpanel itself, the Mail Routing "Automatically Detect Configuration :" says Local. I'm wondering if I have stumbled on an issue in the API or perhaps I have misunderstood how to configure the Extertnal mail servers. Version of cPanel & WHM: 64.0 (build 17) (copied from inside WHM) Geo
# cpapi2 --user=cpanelusername Email getalwaysaccept domain=
---
cpanelresult:
apiversion: 2
data:
-
alwaysaccept: 0
domain:
mxcheck: auto
event:
result: 1
func: getalwaysaccept
module: EmailFrom within Cpanel itself, the Mail Routing "Automatically Detect Configuration :" says Local. I'm wondering if I have stumbled on an issue in the API or perhaps I have misunderstood how to configure the Extertnal mail servers. Version of cPanel & WHM: 64.0 (build 17) (copied from inside WHM) Geo
-
From within Cpanel itself, the Mail Routing "Automatically Detect Configuration :" says Local.
Hello Geo, Could you let us know how you are initially changing the email routing for the domain name? For instance, I accessed "Email Routing" in cPanel and changed the routing for a domain name to "Automatically Detect Configuration : Local (recommended)". Upon doing, here's the result of the getalwaysaccept cPanel API 2 command:cpapi2 --user=cptest01 Email getalwaysaccept domain=cptest01.tld --- cpanelresult: apiversion: 2 data: - alwaysaccept: 0 domain: cptest01.tld mxcheck: auto event: result: 1 func: getalwaysaccept module: Email
I then browsed to "Email Routing" in cPanel again, and changed the routing for the domain name to "Local Mail Exchanger". Here's the result of the getalwaysaccept cPanel API 2 command after doing this:cpapi2 --user=cptest01 Email getalwaysaccept domain=cptest01.tld --- cpanelresult: apiversion: 2 data: - alwaysaccept: 1 domain: cptest01.tld mxcheck: local event: result: 1 func: getalwaysaccept module: Email
If "Automatically Detect Configuration" is selected, then "alwaysaccept" should be "0". Thank you.0 -
We have been changing the mail routing via the "Mail Routing" page in the customer's cpanel. For us, this is no longer urgent as we have worked around it, via the mxcheck api call. If "alwaysaccept" is supposed to be "0" unless "Local Mail Exchanger" is selected, then I guess I have misunderstood the output of that api. I understood the returned "alwaysaccept" response attribute as being "Is this server accepting email for this domain?". Happy to close this ticket on that basis. 0 -
Hello, You can find some additional discussion of this topic on the following thread: MX Entries and the API Thank you. 0
Please sign in to leave a comment.
Comments
3 comments