LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-03-2008, 01:01 AM   #1
noir911
Member
 
Registered: Apr 2004
Posts: 682

Rep: Reputation: Disabled
Bind: adding DNS entries


Is it possible to add a different MX record for a sub-domain when the MX record for the domain is already defined?

I got:

Quote:
$origin domain.com
@ mx 10 mx1.it.domain.com.
mx 20 mx2.it.domain.com.

just under this I defined:

sandbox1.test a 203.10.77.98
sandbox2.test a 203.10.77.95
test.domain.com mx 10 sandbox1.test.domain.com.
test.domain.com mx 20 sandbox2.test.domain.com.
So when people type: host -t mx test.domain.com. the get the output: sandbox1.test.domain.com. and sandbox2.test.domain.com.

Is this going to work?

Thanks.
 
Old 10-03-2008, 03:57 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
I'm confused by your question actually? You want them to see both MX records? That's by default really. Clearly from what you've provided, you have a primary MX host and the secondary if the first one is unreachable. Your secondary MX host should be configured to hold email until the first one is available again.
 
Old 10-03-2008, 04:53 PM   #3
noir911
Member
 
Registered: Apr 2004
Posts: 682

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by trickykid View Post
I'm confused by your question actually? You want them to see both MX records? That's by default really. Clearly from what you've provided, you have a primary MX host and the secondary if the first one is unreachable. Your secondary MX host should be configured to hold email until the first one is available again.
Sorry for being confusing. I'm testing a new sub-domain with a new MX record. But there seems to be no way to tell Bind to point to the new MX record (it is still pointing to the old one). ie. if I try "host -t mx <whatever>.domain.com", it points to my old mx.

Do you know why this is happening and how to change that?

Thanks.
 
Old 10-03-2008, 10:26 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
What you are doing is correct. Did you update the serial number and reload bind?
 
Old 10-07-2008, 07:57 PM   #5
noir911
Member
 
Registered: Apr 2004
Posts: 682

Original Poster
Rep: Reputation: Disabled
Not sure if this would help but following is a part of my domain.com file

Code:
$origin domain.com.
@               ns      ns1.domain.com.
                ns      ns2.domain.com.
                mx      10     jafar.domain.com.
                mx      20     yoda.domain.com.
;
staff           mx      10     jafar.domain.com.
                mx      20     yoda.domain.com.
*               mx      10     jafar.domain.com.
*               mx      20     yoda.domain.com.

The following is added by me

mx1             a       203.10.77.192
mx2             a       203.10.77.183

sandbox1.test     a  203.10.77.98
sandbox2.test     a      203.10.77.95
test.domain.com    mx 10       mx1.domain.com.
test.domain.com    mx 20       mx2.domain.com.
If I do "host -t mx test.domain.com" it's still pointing to jafar.domain.com. and yoda.domain.com. And, yes, I have update the DNS serial and restarted bind.

Thanks for any help.
 
Old 10-08-2008, 01:18 AM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
One would typically use @ instead of * in the hostname field of the MX record:

Code:
@               mx      10     jafar.domain.com.
@               mx      20     yoda.domain.com.
This would indicate that all mail for the current ORIGIN (domain.com in this case) would be MX'd to jafar and yoda. * is the anything wildcard.
 
Old 10-08-2008, 02:19 AM   #7
noir911
Member
 
Registered: Apr 2004
Posts: 682

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Mr. C. View Post
One would typically use @ instead of * in the hostname field of the MX record:

Code:
@               mx      10     jafar.domain.com.
@               mx      20     yoda.domain.com.
This would indicate that all mail for the current ORIGIN (domain.com in this case) would be MX'd to jafar and yoda. * is the anything wildcard.
Thanks for your suggestions. Is there any way I can get my new MX's to test my sandbox without changing the *'s? I want to leave the *'s the way they are.
 
Old 10-08-2008, 02:31 AM   #8
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Do you notice you are missing periods at the end of your domain names:

Code:
test.domain.com    mx 10       mx1.domain.com.
test.domain.com    mx 20       mx2.domain.com.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BIND (DNS) Entries Atwin Linux - Server 3 10-25-2008 10:51 PM
With bind DNS on localhost, still need to add entries to /etc/hosts? pridefc Linux - Networking 1 04-21-2008 01:24 AM
DHCPD-3 not adding DNS entries for Linux clients mobiusNZ Linux - Networking 2 03-11-2007 09:47 PM
need help to set up caching only dns server to with bogus DNS entries ullas Linux - Networking 1 10-28-2003 02:54 PM
adding win 2000 server domain controller, bind dns GraemeK Linux - Networking 6 08-23-2003 06:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration