一.sendmail介绍
邮件系统角色
MUA(邮件用户代理)、MTA(邮件传输代理)、MDA(邮件分发代理 )
邮件应用协议
SMTP,简单邮件传输协议,TCP 25端口
POP3,第3版邮局协议,TCP 110端口
IMAP4,第4版因特网消息访问协议,TCP 143端口
二.sendmail的基本配置
(1)邮件服务器
yum install sendmail m4 sendmail-cf sendmail-doc
1.cd /etc/mail
2.vim sendmail.mc
:/127.0.0.1=0.0.0.0
3.vim access
Connect:127.0.0.1 RELAY
Connect:192.168.101 RELAY(向外转发)
liuwei.com OK
4.vim local-host-names
liuwei.com
(本地区域名)
5.vim /etc/sysconfig/network
hostname=mail.liuwei.com
6.vim /etc/hosts
mail.liuwei.com
7.vim /etc/resolv.conf DNS指向
nameserver 192.168.101.200
(2)DNS服务器
1.cd /var/named/chroot/etc
2.cp -p named.caching named.conf
3.vim named.conf
27 any
28 any
37 any
38 any
4.vim named.rfc1912.zones
zone "liuwei.com" IN {
type master;
file "liuwei.com.zone";
allow-update { none; };
};
zone "101.168.192.in-addr.arpa" IN {
type master;
file "192.168.101.zone";
allow-update { none; };
};
5.cd ../var/named/
6.cp -p localhost.zone liuwei.com.zone
7.vim liuwei.com.zone
2 @ IN SOA ns.liuwei.com.
9 @ IN NS ns.liuwei.com.
10ns IN A 192.168.101.200
11mail IN A 192.168.101.200
12pop3 IN CNAME mail
13smtp IN CNAME mail
14@ IN MX 10 mail
8.vim 192.168.101.zone
加上 200 IN PTR mail.liuwei.com.
9.init 6
10.yum install -y dovecot
11.service dovecot start
三.发送的加密
本文出自 “碧云天” 博客,转载请与作者联系!