Sendmail 配置实例介绍(1)


Sendmail 配置实例介绍如下:

sina.com 10.0.0.20 163.com 10.0.0.30

MX:dns.sina.com (hostname) MX:smtp.163.com(hostname)

邮件服务器A(MTA) 邮件服务器B(MTA)

DNS解析系统

邮件客户端A(MUA) 邮件客户端B(MUA)

目标:

1.两台邮件服务器分别属于sina.com和163.com;各集成smtp和pop3服务功能。

2.其中sina的邮件服务器被同时配置为DNS服务器集成DNS功能并能够解析两个域的所有主机。

3.最终两台服务器实现两个域的邮件转发,经过OUTLOOK测试成功

4.其他附加功能在后。

步骤:

1.配置DNS服务。基本配置:hostname=dns.sina.com;ipaddr=10.0.0.20

DNS服务相关文件为:

#/etc/named.conf中添加正向、反向解析区域:

zone "sina.com" IN {

type master;

file "sina.com.zone";

allow-update { none; };

};

zone "163.com" IN {

type master;

file "163.com.zone";

allow-update { none; };

};

zone "0.0.10.in-addr.arpa" IN {

type master;

file "sina.com.local";

allow-update { none; };

};

之后区域文件sina.com.zone、163.com.zone和163.com.local内容如下:

$TTL 86400

$ORIGIN sina.com.

@ 1D IN SOA dns.sina.com. root.sina.com. (

42 ; serial (d. adams)

3H ; refresh

15M ; retry

1W ; expiry

1D ) ; minimum

1D IN NS dns.sina.com.

1D IN MX 5 dns.sina.com.

dns 1D IN A 10.0.0.20

smtp 1D IN CNAME dns

pop3 1D IN CNAME dns

$TTL 86400

$ORIGIN 163.com.

@ 1D IN SOA dns.sina.com. root.sina.com. (

42 ; serial (d. adams)

3H ; refresh

15M ; retry

1W ; expiry

1D ) ; minimum

1D IN NS dns.sina.com.

1D IN MX 5 smtp.163.com.

smtp 1D IN A 10.0.0.30

pop3 1D IN CNAME smtp

$TTL 86400

@ IN SOA dns.sina.com. root.sina.com. (

1997022700 ; Serial

28800 ; Refresh

14400 ; Retry

3600000 ; Expire

86400 ) ; Minimum

IN NS dns.sina.com.

20 IN PTR smtp.sina.com.

20 IN PTR pop3.sina.com.

30 IN PTR smtp.163.com.

30 IN PTR pop3.163.com.

#service sendmail restart

解析测试。


相关内容