split dns, MX records, and sending mail from a Win2K server

Barry Margolin barmar at alum.mit.edu
Fri Oct 22 00:56:27 UTC 2004


In article <cl999c$djd$1 at sf1.isc.org>, vze78se7 at verizon.net wrote:

> Hi: I'm a little confused about split DNS.
> 
> I have a webserver (Win2K), DNS (Linux/BIND 9.2.3)  and a separate
> mailserver on a 192.168.1.x subnet.
> 
> I've set up a "local.domain.com" zone and added it to my named.conf
> file under the local view for that subnet.
> 
> I have the primary DNS for the webserver (Win2K server) as the BIND
> server. If I perform an nslookup from the webserver, it correctly
> returns the local IP addresses for various servers specified in the
> "local" zone file.
> 
> Here's the problem. I send out emails from the webserver using CDO. If
> I have a customer service form, when constructing an email I specify
> the recipient to be something like "service at mydomain.com", where
> "mydomain.com" is the site being hosted on the webserver.
> 
> When CDO drops the email in the outgoing mail folder, it never gets
> delivered. The event log says something like:
> 
> "Message delivery to the remote domain 'mydomain.com' failed for the
> following reason: The connection was dropped by the remote host."

That suggests that CDO successfully looked up the MX record for 
mydomain.com, and encountered a problem when talking to that server.

> 
> My local.mydomain.com zone file looks like:

I thought you said the zone you added to your server was 
local.domain.com, not local.mydomain.com.  In either case, this zone 
should have no impact at all on mail to user at mydomain.com.

> 
> 	IN NS ns.myhostsdomain.com
> 
> 	IN MX 10	mail
> 
> 	IN A	192.168.1.213	//the webserver
> mail	IN A	192.168.1.230	//the mailserver
> www	IN A	192.168.1.213	//the webserver
> 
> 
> But I think what's happening is mail addressed to "mydomain.com" is
> never being sent to the mailserver...like the MX record's being
> ignored and it's trying to send mail back to itself.

The MX record would only be used if you sent mail to 
user at local.mydomain.com, not user at mydomain.com.

> 
> I ended up getting things to work by adding an entry in the hosts file
> on the webserver like:
> 
> 192.168.1.230	mydomain.com	#the IP of the mailserver
> 
> but the only reason this works, I believe, is because the hosts file
> is queried before the NS.
> 
> I guess this is really a Win2K question, but I'm hoping someone may
> have been through this before and can explain where I'm going wrong.

If you want to control how mail is delivered for mydomain.com, you need 
to add that zone to the nameserver.

-- 
Barry Margolin, barmar at alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


More information about the bind-users mailing list