How to use different DNS servers for different domains

I have a postfix/spamassassin email server running in a DMZ.  I am trying to have it query 2 different DNS servers depending on what domain suffix they are trying to resolve.  I found a way to do it in the Mac world but not linux.  The server is Ubutu 7.10.

Here is the link on how to do it in the Mac world.  Can something like this be done in the Linux world?

http://www.macosxhints.com/article.php?story=2004062902195410
LVL 1
timkrampe1Asked:
Who is Participating?
 
thehagmanConnect With a Mentor Commented:
Actually the answer by Oren instructs the system to look for foo.domain1.com and foo.domain2.com if foo cannot be found.
The OP seems to want to check with server1 when looking for foo.domain1.com and server2 when looking for foo.domain2.com
I don't see how to configure that at the resolver; rather this may have to be configured at an internal name server ...
0
 
0renCommented:
in linux you should edit /etc/resolv.conf and enter inside:

search domain.com
nameserver 12.14.151.1
nameserver 12.14.151.2
nameserver 12.14.151.3

0
 
0renCommented:
on search you can all the domains you need

search domain1.com domain2.com
0
 
diepesCommented:
have a look at dnsmasq - a dns server.

you point your resolver to it 127.0.0.1, and you can configure dnsmasq to do what you want.
0
 
timkrampe1Author Commented:
I will give these suggestions a try and get back to you.  Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.