Website Hosted with me, Mail hosted at company site

mstorman

Member
Dec 7, 2005
13
0
151
Hi all,

I have a client that hosts their website with me and hosts their mail(Exchange) on site. Do i just need to Edit the DNS zone, create an A record for mail, then point mail to the IP of their company?

Please advise.

Thanks,
Matthew
 

ntwaddel

Well-Known Member
Nov 3, 2003
173
0
166
Templeton, CA
they probably already have an dns record for their exchange server, so you just need to change the MX record to point to their server
 

neonix

Well-Known Member
Oct 21, 2004
124
2
168
......and add the domain name to /etc/remotedomains and restart Bind for the changes to take effect.
 

verdon

Well-Known Member
Nov 1, 2003
940
16
168
Northern Ontario, Canada
cPanel Access Level
Root Administrator
mstorman said:
...just need to Edit the DNS zone, create an A record for mail, then point mail to the IP of their company?
I have a couple setup like that and it works fine. It's also important to make sure the correct entries are done in /etc/remotedomains and /etc/localdomains.
 

mstorman

Member
Dec 7, 2005
13
0
151
verdon said:
I have a couple setup like that and it works fine. It's also important to make sure the correct entries are done in /etc/remotedomains and /etc/localdomains.
Can you expand on what exactly needs to be done. I have access to WHM, however i don't have root access.

Thanks,
 

adept2003

Well-Known Member
Aug 11, 2003
281
0
166
~ "/(extra|special)/data"
As a reseller, you really should be getting support for this issue from your webhost.

Depending on whether they've allowed you to edit DNS / MX records, you may be able to do that yourself.

However, you will need to ask them to remove/add entries for the domain to localdomains/remotedomains. If you aren't able to edit dns/mx records, then your web host will need to do that for you too.
 

mstorman

Member
Dec 7, 2005
13
0
151
adept2003 said:
As a reseller, you really should be getting support for this issue from your webhost.

Depending on whether they've allowed you to edit DNS / MX records, you may be able to do that yourself.

However, you will need to ask them to remove/add entries for the domain to localdomains/remotedomains. If you aren't able to edit dns/mx records, then your web host will need to do that for you too.
I do have DNS edit rights, so i do have an A record for mail.domain.com pointing to the company's IP. However, im not sure what you mean by "However, you will need to ask them to remove/add entries for the domain to localdomains/remotedomains"

Please advise.

Thanks
 

mstorman

Member
Dec 7, 2005
13
0
151
verdon said:
I have a couple setup like that and it works fine. It's also important to make sure the correct entries are done in /etc/remotedomains and /etc/localdomains.
I spoke to them about this. They have completed this.
 

verdon

Well-Known Member
Nov 1, 2003
940
16
168
Northern Ontario, Canada
cPanel Access Level
Root Administrator
mstorman said:
Also,

Can you post the proper DNS configuration for my current situation?

Thanks,
Here's an example from mine...
Code:
; Modified by Web Host Manager
; Zone File for domain.com
$TTL 14400
@	14440	IN	SOA	ns1.host.com.	admin.host.com.	(
					2005080502
					7200
					7200
					2419200
					86400
					)

domain.com.	14400	IN	NS	ns1.host.com.
domain.com.	14400	IN	NS	ns2.host.com.

domain.com.	14400	IN	A	xx.xx.xxx.xx

localhost.domain.com.	14400	IN	A	127.0.0.1

domain.com.	14400	IN	MX	0	mail.domain.com.
domain.com.	14400	IN	MX	50	backupmx.host.com.

mail	14400	IN	A	xxx.xx.xxx.xxx
www	14400	IN	CNAME	domain.com.
ftp	14400	IN	A	xx.xx.xxx.xx
 

mstorman

Member
Dec 7, 2005
13
0
151
Verdon, that worked however.....

When i send email from the timbermountain.net domain to other domains that i host i get a bounceback
-----------------------------------
Your message did not reach some or all of the intended recipients.

Subject: testing
Sent: 12/10/2005 9:33 AM

The following recipient(s) could not be reached:

[email protected] on 12/10/2005 9:33 AM
There was a SMTP communication problem with the recipient's email server. Please contact your system administrator.
<mail.timbermountain.net #5.5.0 smtp;550-Verification failed for <[email protected]>>
------------------------------------------


Also, when i send email from any of the domains i host to the timbermountain.net domain, i also get a bounceback
--------------------------------------------------
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

[email protected]
unrouteable mail domain "timbermountain.net"

------ This is a copy of the message, including all the headers. ------

Return-path: <[email protected]>
Received: from 69-160-141-103.ontrca.adelphia.net ([69.160.141.103] helo=home01)
by server41.integrityserver.net with esmtp (Exim 4.52)
id 1El8Jg-00054Z-Pr
for [email protected]; Sat, 10 Dec 2005 11:15:24 -0600
From: "Matthew Storman" <[email protected]>
To: <[email protected]>
Subject: testing once more
Date: Sat, 10 Dec 2005 09:15:36 -0800
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_000A_01C5FD6A.49C4EB90"
X-Mailer: Microsoft Office Outlook 11
thread-index: AcX9rVYEfIgYwW/NRsyQSb8jKNT+jQ==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180

This is a multi-part message in MIME format.

------=_NextPart_000_000A_01C5FD6A.49C4EB90
Content-Type: text/plain;
charset="windows-1250"
Content-Transfer-Encoding: 7bit

Testing.
-------------------------------------

However, if i send email from the timbermountain.net domain to Yahoo, Gmail etc, the email goes just fine. And likewise if i send it from Yahoo, Gmail etc, email is recieved at the timbermountain.net domain.

Please HELP!

Thanks,
Matthew
 

verdon

Well-Known Member
Nov 1, 2003
940
16
168
Northern Ontario, Canada
cPanel Access Level
Root Administrator
well, I'm not sure I'm really the best one to answer... I just set mine up based on tips I found here, and I've had no problems. If I had to guess, I would guess that the timbermountain.net hasn't been moved from localdomains to remotedomains. Also, to be honest, I can remember if it's neccessary to re-start exim or not after making the change.

Sorry I can't be more help, it's been a few months since I did one of these on my server.
 

TAK

Well-Known Member
Dec 10, 2003
64
0
156
Just to simplify a few things:

If you use the MX editor in WHM, it will automatically remove the domain from localdomains and put it in remotedomains. If you edit the DNS zone and do it from there, then it will not.

Restarting bind either way is recommended.
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
Melbourne, Australia
cPanel Access Level
Root Administrator
Also, I've found that if you modify the default "mail.domain.com" record sometimes cpanel doesn't seem to realize that you've changed the default MX. To change the incoming SMTP server (MX) for a domain, I'd do two things (assuming the IP address for the SMTP server is 200.200.200.200):
1. Create a DNS A record mailserver.domain.com with IP 200.200.200.200
2. Use the cpanel MX changer to point the MX record to mailserver.domain.com.
These two steps, if they both work, are all that's required, I've done it lots. You don't need another MX, it really adds very little.

Never, ever point MX records to IP addresses - while it works for about 95% of incoming email, it breaks agreed Internet email standards and will prevent some people from emailing you. You don't want to cause this sort of obscure pain for yourself! :)

After using the cpanel MX function, if you have server login access, or know how to write a simple PHP script, you should check that domain.com has been removed from /etc/localdomains and put in /etc/remotedomains. Cpanel's Exim will try to process mail for domains listed in /etc/localdomains itself, so unless the domain.com line is removed and put into /etc/remotedomains, it just won't work for you. It's worth checking that cpanel is getting this right, because as I said above, it wasn't for a few months back earlier this year - I think it gets it right now.

Once you've made the changes, go to www.dnsstuff.com and use the top right column to check the MX record definition has changed. If it hasn't, check your DNS settings in WHM's "Edit DNS Zone". If that still doesn't fix it, try either editing again, or getting the server admin to restart your server Bind. (probably unlikely you'll need to do either, it should work).
 

mstorman

Member
Dec 7, 2005
13
0
151
brianoz said:
Also, I've found that if you modify the default "mail.domain.com" record sometimes cpanel doesn't seem to realize that you've changed the default MX. To change the incoming SMTP server (MX) for a domain, I'd do two things (assuming the IP address for the SMTP server is 200.200.200.200):
1. Create a DNS A record mailserver.domain.com with IP 200.200.200.200
2. Use the cpanel MX changer to point the MX record to mailserver.domain.com.
These two steps, if they both work, are all that's required, I've done it lots. You don't need another MX, it really adds very little.

Never, ever point MX records to IP addresses - while it works for about 95% of incoming email, it breaks agreed Internet email standards and will prevent some people from emailing you. You don't want to cause this sort of obscure pain for yourself! :)

After using the cpanel MX function, if you have server login access, or know how to write a simple PHP script, you should check that domain.com has been removed from /etc/localdomains and put in /etc/remotedomains. Cpanel's Exim will try to process mail for domains listed in /etc/localdomains itself, so unless the domain.com line is removed and put into /etc/remotedomains, it just won't work for you. It's worth checking that cpanel is getting this right, because as I said above, it wasn't for a few months back earlier this year - I think it gets it right now.

Once you've made the changes, go to www.dnsstuff.com and use the top right column to check the MX record definition has changed. If it hasn't, check your DNS settings in WHM's "Edit DNS Zone". If that still doesn't fix it, try either editing again, or getting the server admin to restart your server Bind. (probably unlikely you'll need to do either, it should work).
The thing that i was doing incorrectly was if you look at what verdon posted above

domain.com. 14400 IN MX 0 mail.domain.com.

i had

domain.com. 14400 IN MX 0 xxx.xx.xxx.xx

so it was not working correctly, thanks all for your help :). Also one last question.

how would i add a secondary mx record for mail.domain.com ?