Postfix Integrated Solution | ||
---|---|---|
<<< Previous | Next >>> |
注意!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
域名設置這一步驟非常重要,如果設置不當,就會出現郵件發不出,收不到等等問題……
以中國萬網的域名管理為例,下面是中國萬網的域名管理面板
A 記錄
添加mail A記錄,並解析到你伺服器的IP
MX 郵件交換記錄
添加mx 記錄,並解析到你mail主機
保存設置
保存設置後,一般會在48小時後生效
注意事項
有一些域名提供商的mx 記錄要在主機後加".",中國萬網的不用,他們會自動給你加上。如果你的域名是在外國註冊的。如美國,域名更新要4-7個工作日。
如果不想等48個小時,你可以修改你的系統DNS,設為你的域名提供商的DNS。這裡以中國萬網為例:
C:\>nslookup Default Server: apngw.sz002.nfht Address: 192.168.0.253 > set type=ns > net.cn Server: apngw.sz002.nfht Address: 192.168.0.253 Non-authoritative answer: net.cn nameserver = sld-ns2.cnnic.net.cn net.cn nameserver = sld-ns3.cnnic.net.cn net.cn nameserver = sld-ns4.cnnic.net.cn net.cn nameserver = sld-ns5.cnnic.net.cn net.cn nameserver = cns.cernet.net net.cn nameserver = sld-ns1.cnnic.net.cn sld-ns2.cnnic.net.cn internet address = 202.97.16.197 sld-ns3.cnnic.net.cn internet address = 210.52.214.85 sld-ns4.cnnic.net.cn internet address = 61.145.114.119 sld-ns5.cnnic.net.cn internet address = 61.139.76.54 cns.cernet.net internet address = 202.112.0.24 sld-ns1.cnnic.net.cn internet address = 159.226.1.3 > set querytype=ns > www.net.cn Server: apngw.sz002.nfht Address: 192.168.0.253 Non-authoritative answer: www.net.cn nameserver = dns2.hichina.com www.net.cn nameserver = dns1.hichina.com dns2.hichina.com internet address = 202.106.169.100 dns1.hichina.com internet address = 218.30.103.50 > dns1.hichina.com Server: apngw.sz002.nfht Address: 192.168.0.253 hichina.com primary name server = dns1.hichina.com responsible mail addr = hostmaster.hichina.com serial = 2004040801 refresh = 21601 (6 hours 1 sec) retry = 3600 (1 hour) expire = 1728000 (20 days) default TTL = 43200 (12 hours) > dns2.hichina.com Server: apngw.sz002.nfht Address: 192.168.0.253 hichina.com primary name server = dns1.hichina.com responsible mail addr = hostmaster.hichina.com serial = 2004040801 refresh = 21601 (6 hours 1 sec) retry = 3600 (1 hour) expire = 1728000 (20 days) default TTL = 43200 (12 hours) > set type=a > dns1.hichina.com Server: apngw.sz002.nfht Address: 192.168.0.253 Non-authoritative answer: Name: dns1.hichina.com Address: 218.30.103.50 > dns2.hichina.com Server: apngw.sz002.nfht Address: 192.168.0.253 Non-authoritative answer: Name: dns2.hichina.com Address: 202.106.169.100 > > exit C:\> |
首先,單擊開始菜單->運行->輸入cmd。進入CLI(命令行界面)然後運行nslookup程序,nslookup會顯示">"命令提示符
set type=ns
設計查詢類型,ns是查詢dns伺服器
net.cn
顯示net.cn域名的上級dns,可以看得出net.cn上級是cnnic(中國互聯網絡信息中心)
set querytype=ns
與set type=ns相同
www.net.cn
顯示www.net.cn的dns伺服器
dns2.hichina.com
dns1.hichina.com
這就是我們要的dns伺服器,你可以使用ping命令得到dns的IP,也可以使用正向解析得到它的IP。
C:\>ping dns2.hichina.com Pinging dns2.hichina.com [202.106.169.100] with 32 bytes of data: Reply from 202.106.169.100: bytes=32 time=243ms TTL=241 Reply from 202.106.169.100: bytes=32 time=233ms TTL=241 Reply from 202.106.169.100: bytes=32 time=312ms TTL=241 Reply from 202.106.169.100: bytes=32 time=236ms TTL=241 Ping statistics for 202.106.169.100: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 233ms, Maximum = 312ms, Average = 256ms C:\> |
set type=a
dns1.hichina.com
通過正向解析得到dns1.hichina.com的IP
設置Internet 協議(TCP/IP)
Linux
[root@linux root]# vi /etc/resolv.conf nameserver 218.30.103.50 nameserver 202.106.169.100 |
測試你的域名
C:\>nslookup Default Server: apngw.sz002.nfht Address: 192.168.0.253 > 9812.net Server: apngw.sz002.nfht Address: 192.168.0.253 Name: 9812.net Address: 202.103.190.130 > set type=ns > 9812.net Server: apngw.sz002.nfht Address: 192.168.0.253 Non-authoritative answer: 9812.net nameserver = dns1.hichina.com 9812.net nameserver = dns2.hichina.com dns1.hichina.com internet address = 218.30.103.50 dns2.hichina.com internet address = 202.106.169.100 > set type=mx > 9812.net Server: apngw.sz002.nfht Address: 192.168.0.253 9812.net MX preference = 10, mail exchanger = mail.9812.net 9812.net nameserver = dns2.hichina.com 9812.net nameserver = dns1.hichina.com mail.9812.net internet address = 202.103.190.130 dns2.hichina.com internet address = 202.106.169.100 dns1.hichina.com internet address = 218.30.103.50 > |
Linux CLI
[root@linux root]# nslookup Note: nslookup is deprecated and may be removed from future releases. Consider using the `dig' or `host' programs instead. Run nslookup with the `-sil[ent]' option to prevent this message from appearing. > 9812.net Server: 202.96.128.68 Address: 202.96.128.68#53 Non-authoritative answer: Name: 9812.net Address: 202.103.190.130 > set type=mx > 9812.net Server: 218.30.103.50 Address: 218.30.103.50#53 9812.net mail exchanger = 10 mail.9812.net. > set type=ns > 9812.net Server: 202.96.128.68 Address: 202.96.128.68#53 Non-authoritative answer: 9812.net nameserver = dns1.hichina.com. 9812.net nameserver = dns2.hichina.com. Authoritative answers can be found from: > |
<<< Previous | Home | Next >>> |
卸載現有的郵件系統 | BIND 9 例子 |