Is there a way to force mail routing to "auto" on all domains?
I've been using a plugin with an external MTA that sets mail routing to "local" when using certain MX records. I would like to reset all domains on the server to "auto" routing. Is this possible?
Is there also any process that can be run that will check each domain to determine the routing and set the /etc/localdomains or /etc/remotedomains files accordingly?
Finally, if an MX record has an IP that matches an IP in the "Remote Service IP's" > "Remote Mail Server IP's" list, with "auto"set on the routing, will this consider the MX record to be local rather than remote?
Thank you.
-
Hello, You'd have to create a loop for it but the following UAPI function would allow you to set the mail exchanger type for all zones to auto: uapi --user=$USER Email set_always_accept domain=$DOMAIN.TLD mxcheck=auto
details on it can be found here: "Remote Mail Server IP's" list, with "auto"set on the routing, will this consider the MX record to be local rather than remote?
The documentation on this can be found here:0 -
Great stuff, thanks. Does this UAPI function simply set the routing to auto - or does it also process the domain and set it into localdomains / remotedomains accordingly? When you say I'd need to create a loop for it, would /etc/userdomains be good as as a reference point? 0 -
Great stuff, thanks. Does this UAPI function simply set the routing to auto - or does it also process the domain and set it into localdomains / remotedomains accordingly? When you say I'd need to create a loop for it, would /etc/userdomains be good as as a reference point?
Any time you set the routing it adds the domain to the respective file. For looping through the users - userdomains would be good to get their domains from yes but the list domains UAPI function might be better: . An example of loops for users can be found in the following as well0
Please sign in to leave a comment.
Comments
3 comments