自建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:\Users\cutepig>e:\Users\cutepig\Downloads\maradns-2-0-13-win32\maradns-2-0-13-win32\askmara.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:\Users\cutepig>nslookup test.local.com
Server: localhost
Address: 127.0.0.1

Name: test.local.com
Address: 192.168.2.100


C:\Users\cutepig>
C:\Users\cutepig>nslookup mail.local.com
Server: localhost
Address: 127.0.0.1

Name: mail.local.com
Address: 192.168.2.100


C:\Users\cutepig>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

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值