自建mail服务器之一:dns解析

这个其实不是必须的

1,maradns服务器安装和设置

mararc文件

# Win32-specific MaraRC file; this makes a basic recursive DNS
# server.

hide_disclaimer = "YES"
ipv4_bind_addresses = "127.0.0.1,192.168.2.100"
recursive_acl = "127.0.0.1/8"
timestamp_type = 2

csv2 = {}
csv2["local.com."] = "db.lan.txt"

# This is insecure until the secret.txt file is edited
random_seed_file = "secret.txt"

upstream_servers = {}
upstream_servers["."] = "203.185.0.35,203.185.0.36"

db.lan.txt

test.%       192.168.2.100 ~
%	MX	10 mail.% ~
mail.%	192.168.2.100 ~

  

2,配置系统dns服务器为127.0.0.1

 3,测试

C:Userscutepig>e:UserscutepigDownloadsmaradns-2-0-13-win32maradns-2-0-13-win32askmara.exe Amail.local.com.
# Querying the server with the IP 127.0.0.1
# Question: Amail.local.com.
mail.local.com. +86400 a 192.168.2.100
# NS replies:
#local.com. +86400 ns synth-ip-c0a80264.local.com.
# AR replies:
#synth-ip-c0a80264.local.com. +86400 a 192.168.2.100

C:Userscutepig>nslookup test.local.com
Server: localhost
Address: 127.0.0.1

Name: test.local.com
Address: 192.168.2.100


C:Userscutepig>
C:Userscutepig>nslookup mail.local.com
Server: localhost
Address: 127.0.0.1

Name: mail.local.com
Address: 192.168.2.100


C:Userscutepig>nslookup -type=MX local.com
Server: localhost
Address: 127.0.0.1

local.com MX preference = 10, mail exchanger = mail.local.com
local.com nameserver = synth-ip-c0a80264.local.com
mail.local.com internet address = 192.168.2.100
synth-ip-c0a80264.local.com internet address = 192.168.2.100

原文地址:https://www.cnblogs.com/cutepig/p/5906003.html