当前位置: 技术问答>linux和unix
mail MX 怎么写DNS记录
来源: 互联网 发布时间:2014-11-19
本文导语: 服务器是XXXX.com 现在邮件系统装到另外一台机上了如 Bj.XXXX.com 但信箱还是要 evicn@XXXX.com 怎么写DNS? 还有,如果我的DNS全部写在一台机上(包括几个域名) 那么我每个域名都有不同的ip 那么怎么写DNS使到这几个域...
服务器是XXXX.com
现在邮件系统装到另外一台机上了如 Bj.XXXX.com
但信箱还是要 evicn@XXXX.com
怎么写DNS?
还有,如果我的DNS全部写在一台机上(包括几个域名) 那么我每个域名都有不同的ip
那么怎么写DNS使到这几个域名都有自己的@XXXX.COM??
现在邮件系统装到另外一台机上了如 Bj.XXXX.com
但信箱还是要 evicn@XXXX.com
怎么写DNS?
还有,如果我的DNS全部写在一台机上(包括几个域名) 那么我每个域名都有不同的ip
那么怎么写DNS使到这几个域名都有自己的@XXXX.COM??
|
看看 Linux HowTo文件, (http://www.linuxdoc.org)
下面為一例子作參考.
http://www.tldp.org/LDP/LG/issue45/pollman/dns_mail.html
In last month's article we set up dns as a name server for network. Sendmail, and most other mail transport programs, use dns to decide where to send the mail, but we need to modify it a bit. The name-to-ip file has to have a MX line for each computer, which essentially says: for this computer, use this other computer for storing mail.
The file from last month looks like this. Note, the *** are not part of the file:
**************************************************************
@ IN SOA master.kulai.org. jpollman.kulai.org. (
1;
10800;
3600;
604800;
86400 );
IN NS master.kulai.org.
master IN A 192.168.124.10
mail IN A 192.168.124.10
www IN A 192.168.124.10
news IN A 192.168.124.10
localhost IN A 127.0.0.1
fserver IN A 192.168.124.11
jc IN A 192.168.124.1
phillip IN A 192.168.124.20
**************************************************************
We change this to add in the MX lines. Note: the Bold items are explained below and are not part of the format of the file. It now looks like this:
**************************************************************
@ IN SOA master.kulai.org. jpollman.kulai.org. (
2
10800
3600
604800
86400 )
IN NS master
IN MX 10 master
master IN A 192.168.124.10
master IN MX 10 master
mail IN A 192.168.124.10
www IN A 192.168.124.10
news IN A 192.168.124.10
localhost IN A 127.0.0.1
fserver IN A 192.168.124.11
fserver IN MX 10 master
jc IN A 192.168.124.1
jc IN MX 10 master
phillip IN A 192.168.124.20
phillip IN MX 10 master
**************************************************************
Now each computer's (master, fserver, jc, phillip) email server is master.kulai.org (actually it is called a "mail exchanger", but since we have only one computer server mail, it functions as a email server.) We also have a line with no name that points to master.kulai.org as the email server - this is for the domain: kulai.org. You noticed there is a "10" in each line. The number, 10 in this case, is a relative value, and is used when you have multiple mail exchangers - something we are not covering here. Note, failure to put the number in will cause an error in named. Now, restart named, and check /var/log/messages for any errors.
You have to put a line in for each computer: kulai.org by itself will not work.
下面為一例子作參考.
http://www.tldp.org/LDP/LG/issue45/pollman/dns_mail.html
In last month's article we set up dns as a name server for network. Sendmail, and most other mail transport programs, use dns to decide where to send the mail, but we need to modify it a bit. The name-to-ip file has to have a MX line for each computer, which essentially says: for this computer, use this other computer for storing mail.
The file from last month looks like this. Note, the *** are not part of the file:
**************************************************************
@ IN SOA master.kulai.org. jpollman.kulai.org. (
1;
10800;
3600;
604800;
86400 );
IN NS master.kulai.org.
master IN A 192.168.124.10
mail IN A 192.168.124.10
www IN A 192.168.124.10
news IN A 192.168.124.10
localhost IN A 127.0.0.1
fserver IN A 192.168.124.11
jc IN A 192.168.124.1
phillip IN A 192.168.124.20
**************************************************************
We change this to add in the MX lines. Note: the Bold items are explained below and are not part of the format of the file. It now looks like this:
**************************************************************
@ IN SOA master.kulai.org. jpollman.kulai.org. (
2
10800
3600
604800
86400 )
IN NS master
IN MX 10 master
master IN A 192.168.124.10
master IN MX 10 master
mail IN A 192.168.124.10
www IN A 192.168.124.10
news IN A 192.168.124.10
localhost IN A 127.0.0.1
fserver IN A 192.168.124.11
fserver IN MX 10 master
jc IN A 192.168.124.1
jc IN MX 10 master
phillip IN A 192.168.124.20
phillip IN MX 10 master
**************************************************************
Now each computer's (master, fserver, jc, phillip) email server is master.kulai.org (actually it is called a "mail exchanger", but since we have only one computer server mail, it functions as a email server.) We also have a line with no name that points to master.kulai.org as the email server - this is for the domain: kulai.org. You noticed there is a "10" in each line. The number, 10 in this case, is a relative value, and is used when you have multiple mail exchangers - something we are not covering here. Note, failure to put the number in will cause an error in named. Now, restart named, and check /var/log/messages for any errors.
You have to put a line in for each computer: kulai.org by itself will not work.
|
IN MX 10 bj.XXXX.com.
(最后一个点不要省了)
每个域名建一个zone文件
(最后一个点不要省了)
每个域名建一个zone文件