|
|||
|
hosting domain with external mail server
Howdy,
We have a domain that we host the website for on Cpanel. They have their own mail server at a different IP. I've changed their MX record and if you do a host, dig, or nslookup you get the proper info back. I also put an entry in /etc/hosts for it. The problem is that if another domain on that same cpanel server sends mail to the domain with it's own mail server it gets delivered locally, bypassing /etc/hosts and dns! Therefore the domain with their own mail server do not receive mail from other domains hosted on the same cpanel server since it gets deleiverd locally and not to their mail server. Any ideas how to get exim to use /etc/hosts or dns? Or other wise have it not delivered locally but to their mail server? Thanks Dan cPanel.net Support Ticket Number: |
|
|||
|
same trouble here
We are having the same problem here, can't send email to our client, and also, the main account where all the unroutable messages go, will not forward off of the server.
Client will not consider using these mailservers. cPanel.net Support Ticket Number: |
|
|||
|
This is what exim told me:
check the entry for local_domains in your exim.conf file Mine is in /etc/exim.conf and local_domains actuall uses a text file: /etc/localdomains You just remove the domain from that file and it *should got to /etc/hosts and then on to dns. This is what I'm testing as afix right now: if yu can do host -t mx domain.com and get the mx domain, say mail.domain.com then host mail.domain.com and get the proper ip address then removing it form the above file should make it sedn to the remoter mail server instead of locally. Key word being should, but since I've done that today, no more messages have been sent locally, IE their inbox file hasn't gotten any bigger which it would before. If you try thatand it works let em know! Thanks Dan Muey cPanel.net Support Ticket Number: |
|
|||
|
All indications are that this is working now.
Basically it would be nice if Cpanel removed it for you when you change a domain's mx record/mx domain ip address to a remote mail server or give them the option to remove it from the local exim system and tell them they may want to do that when they mess with the mx records. Hope that helps! Dan Muey cPanel.net Support Ticket Number: |
|
|||
|
You will need to remove the domain entry from /etc/userdomains and /etc/localdomains . However if you run /scripts/mailperm, it will add the entries back to /etc/localdomains.
So what you need to do in addition to removing it from /etc/localdomains is to add the domain name in /etc/remotedomains. Once you add it there, the scripts will not make any automatic changes. Warm Regards cPanel.net Support Ticket Number: |
|
|||
|
Excellent! Thanks a million! That is good to know.
Are the other two files you mentioned used by Exim like /etc/localdomains is? I just don't want to mess up any of their cpanel stuff. Thanks again I'm sure many people will find this usefull. Dan Muey cPanel.net Support Ticket Number: |
|
|||
|
Hello Dan,
I just did a similar setup for a client and found that Cpanel adds the domain name to /etc/remotedomains automatically. My experience previously was that it never used to. I guess they finally updated it to work fine ![]() However since some of you are still facing the issues, I am not really sure if its the case across all the servers. I'll tell you what you need to do in a Step by Step way - 1) Use WHM to edit DNS and change the MX entries. 2) pico /etc/localdomains & remove the domain name 3) pico /etc/remotedomains & check if the domain you edited is there. If not, add it. I mentioned in my previous message about /etc/userdomains , you can ignore that. It will get added right back during a cpanel update or by running of other certain scripts. Regards, cPanel.net Support Ticket Number: |
|
|||
|
Why hasn't anyone mentioned changing the MX entry and the 'mail' subdomain in the DNS zone file to point at the external mail server? That way any incoming mail will go directly elsewhere as specified.
www.DuraServer.net Web Hosting ~ Shared & Dedicated Servers ~ Networking ~ Linux Last edited by Drake; 06-25-2003 at 12:48 PM. |
|
|||
|
The server will first check if the domain exists locally. If that is the case, it will first try to deliver the email locally. This will happen if you have scripts/formmails etc installed on the domain.
Since they run on the server, they will directly deliver the email to the server first without looking outside. cPanel.net Support Ticket Number: |
|
|||
|
A small related note that might help others:
If your name servers are _not_ authoritative for the hosted domain (ie. your client manages their own DNS and mail servers), then consider 'Deleting the DNS zone file' for the domain as well via WHM. The risk of not doing this (and instead pointing MX records to their mail server) is that if your client changes their mail setup (name, ip), mail for them passing through your server (eg. from a web form) will be delivered to the wrong location and it can take a while before anyone notices. We've been caught out by this on a number of occasions. Hope that helps someone :-) cPanel.net Support Ticket Number:
__________________
|
|
|||
|
Sorry to bring this back from the dead, but I found a few new issues that this thread fixed.
I had a server restored and restored my backups. One of the accounts used everyone.net. It worked perfect prior to the OS restore. It worked after teh account restore. Then I installed the MailScanner 1.5 from layer1. Wasnp;t working like I had hoped it would (had it on previous OS image without issue) so I used the uninstall. After the uninstall, mail to the domain using everyone.net no longer was delivered as it failed internally. Apparently the mailscanner uninstall reverted all my /etc/*domains files and mail was no longer routed correctly. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|