setting up DNS for web & mail servers.


here is my prob :

I've a server named "serval"
domain : ""
ip addr : ""
this server act as a web server and a mail server.
(OS: RedHat 6.0, sendmail 8.9.3 (pop3),

this server is also his own primary dns server, and another machine in another domain is the secondary dns server.

the dns server is declared to the NIC as  ;

the server will act as a web server for numerous domains, and as a mail server for these same domains.
Each mail server should have, as name,  (i.e.
and web-site should be reached in my server by

for exemple : will be hosted by and mail server should be

What I need is a step by step method to configure dns files

Thanks,   Jacoby.
Who is Participating?
ezleeConnect With a Mentor Commented:
Hi, Jacoby

You could just run "linuxconf" to config your dns server, mail server, and Apache server. "linuxconf" will automatically change the necessary files like "/etc/hostname, /named/conf, /var/ etc.".

First you should run "setup" to activate the "named" daemon. Then, run "linuxconf", in "basic host infomation", give the host name of "" and the IP address of In "Name Server specifications", give the default domain "", and the IP address of nameserver1( nameserver2.

If your server is not connected directly to the internet, just provide the default gateway address. Then give the correct "Host name search path".    

While configuring the DNS server, add the host "serval" and give it CNAME of "www" and "mail". So that when people try to connect to "" or send email to "", they will be directed to host "".

For different domain, you could just config the "Apache Web Server" to add "Virtual domains" on it and "Mail delivery system(sendmail) to add "virtual email domain".

You can do all the job under "linuxconf", and you will never be bothered with any dns or sendmail configuration files. hope this will help you.


All Courses

From novice to tech pro — start learning today.