#1 (permalink)  
Old 06-10-2003, 11:45 AM
Registered User
 
Join Date: Jun 2003
Posts: 17
drmuey
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:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-17-2003, 06:44 PM
Registered User
 
Join Date: May 2003
Posts: 2
dotlizard
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:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-17-2003, 07:05 PM
Registered User
 
Join Date: Jun 2003
Posts: 17
drmuey
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:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-19-2003, 08:49 AM
Registered User
 
Join Date: Jun 2003
Posts: 17
drmuey
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:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-19-2003, 11:26 AM
Registered User
 
Join Date: Feb 2003
Posts: 75
pguy
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:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 06-19-2003, 11:51 AM
Registered User
 
Join Date: Jun 2003
Posts: 17
drmuey
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:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 06-19-2003, 12:01 PM
Registered User
 
Join Date: Feb 2003
Posts: 75
pguy
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:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 06-19-2003, 12:08 PM
Registered User
 
Join Date: Jun 2003
Posts: 17
drmuey
Sweet thanks!!
That should do the trick.

Dan

cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 06-25-2003, 07:45 AM
Registered User
 
Join Date: Mar 2002
Posts: 3
decebal
excellent

thanks a million ... this works ... i was wondering what the remotedomains does.



decebal

cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 06-25-2003, 12:45 PM
Registered User
 
Join Date: Nov 2001
Location: New Jersey
Posts: 65
Drake
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 06-25-2003, 12:50 PM
Registered User
 
Join Date: Feb 2003
Posts: 75
pguy
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:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 08-30-2003, 11:52 PM
Registered User
 
Join Date: Mar 2002
Posts: 421
spaceman
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:
__________________
  • Web Design Perth .:. Itomic Business Website Solutions of Perth, Western Australia
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 05-04-2004, 02:44 PM
Registered User
 
Join Date: Oct 2003
Posts: 24
pavemen is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 12-09-2004, 11:46 AM
Registered User
 
Join Date: Dec 2004
Posts: 1
iamclogger is on a distinguished road
Question

If the remotehosts and localhosts files are not in the /etc folder what is the format of those files if I need to create them?

Can someone post an example of their file for me to reference?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 12-09-2004, 03:11 PM
Registered User
 
Join Date: Oct 2003
Posts: 24
pavemen is on a distinguished road
simple plain text with one domain per line:


domain1.com
domain2.net
etc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:50 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc