LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-13-2012, 05:58 PM   #1
hiep.pham
Member
 
Registered: Jun 2012
Posts: 54

Rep: Reputation: Disabled
MX Records


Hello:

Could someone give me instruction on how to add MX records to our NS server CentOS 5? We using BIND

I hope someone could provide command lines or link to that.

Thanks,
 
Old 12-13-2012, 06:06 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
This is the RHEL5 Admin manual; applies to Centos also. I've linked the page you need http://www.linuxtopia.org/online_boo...3-bind-zone-rr
Scroll down to 16.3.3 for a complete example.
 
Old 12-13-2012, 06:12 PM   #3
hiep.pham
Member
 
Registered: Jun 2012
Posts: 54

Original Poster
Rep: Reputation: Disabled
Thanks. When I run this command and I got this. Did I put a wrong command or something?

[root@mail1 ~]# vi /var/named/chroot/var/named

~
~
~
~
~
~
"/var/named/chroot/var/named" is a directory
 
Old 12-13-2012, 06:28 PM   #4
rosehosting.com
Member
 
Registered: Jun 2012
Location: Missouri, USA
Posts: 236

Rep: Reputation: 64
You'll need to edit the zone file for your domain:

vi /var/named/chroot/var/named/your-domain.com.db

(be sure to replace your-domain.com with your actual domain name).
 
Old 12-13-2012, 06:31 PM   #5
hiep.pham
Member
 
Registered: Jun 2012
Posts: 54

Original Poster
Rep: Reputation: Disabled
Thanks, But it seems like that file is not exist.

[root@mail1 ~]# vi /var/named/chroot/var/named/wemadeusa.com.db

~
~
~
~
~
"/var/named/chroot/var/named/wemadeusa.com.db" [New File]
 
Old 12-13-2012, 06:46 PM   #6
rosehosting.com
Member
 
Registered: Jun 2012
Location: Missouri, USA
Posts: 236

Rep: Reputation: 64
Edit your /var/named/chroot/var/named/wemadeusa.com.db file and add the following lines:

$TTL 14400
@ IN SOA ns1.wemadeusa.com. hostmaster.wemadeusa.com. (
2012121301 ; serial, todays date+todays
28800 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds


wemadeusa.com. 14400 IN NS ns1.wemadeusa.com.
wemadeusa.com. 14400 IN NS ns2.wemadeusa.com.
wemadeusa.com. 14400 IN A 66.150.173.3

localhost 14400 IN A 127.0.0.1

ftp 14400 IN CNAME wemadeusa.com.
mail 14400 IN CNAME wemadeusa.com.
pop 14400 IN CNAME wemadeusa.com.
smtp 14400 IN CNAME wemadeusa.com.
www 14400 IN CNAME wemadeusa.com.

wemadeusa.com. 14400 IN MX 10 mail


Edit your /etc/named.conf file and add the following line:

zone "wemadeusa.com" { type master; file "//var/named/chroot/var/named/wemadeusa.com.db"; };


Then, execute the following command for the changes to take effect:

/etc/init.d/named restart
 
Old 12-13-2012, 07:50 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Indeed; you need to read the whole chapter I linked to. The named.conf file is the main controlling file for BIND, but it needs a zone file (& possible a reverse zone file) for each domain it controls.
 
  


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
[SOLVED] MX Records / A Records / CNAME Records - Advice Please fusion1275 Linux - Newbie 15 01-18-2011 04:06 AM
MX Records Brandon.Wamboldt Linux - Server 2 05-04-2009 03:50 PM
Reading caller detail records(CDR ) records eliufoo Linux - Networking 2 12-16-2008 11:31 PM
DNS Zone Records - MX Records ddzc Linux - Software 8 05-24-2007 01:26 PM
1+0 records in how to disiable in DD command "1+0 records out" Kotresh Linux - Software 3 03-08-2007 08:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:13 AM.

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