linux下配置sendmail企业邮局实验指南
本文总结了最简单的案例帮助红联新手们学会基本的sendmail配置。
出自:www.itshanghai.net
1、 安装相关服务
DNS
Mailserver(sendmail、imap)
2、 启动相关服务
Service named restart
Service sendmail restart
Service xinetd restart
Chkconfig ipop3 on
3、 配置DNS,添加MX纪录
配置DNS略
正/反向区间文件添加MX纪录
IN MX 10(优先级) mail.anniey.com
Mail IN A 192.168.1.100
4、 主配置文件
/etc/mail/sendmail.cf
搜索/smtp
Port=smtp,Addr=192.168.1.100
5、 接受域配置文件
Vi /etc/mail/local-host-names
添加
Anniey.com
192.168.1.100
6、中继转发配置文件
/etc/mail/access.db(不可访问)
Vi /etc/mail/access
添加
Anniey.com
192.168.1
退出
Makemap hash access.db < access
6、 添加用户
Useradd user01
Passwd user01
Useradd user02
Passwd user02
7、 重启服务
Service sendmail restart
Service xinetd restart
补:邮件用户别名,邮件域别名
A)用户别名
1、Vi /etc/aliases
别名 用户名
A01 user01
A02 user02
退出
2、Newaliases
B)邮件域别名
1、配置相关DNS略
2、添加域别名
Vi /etc/mail/sendmail.cw
Anniey.com
Johnny.com
退出
3、接受域配置文件
Vi /etc/mail/local-host-names
Anniey.com
Johnny.com
192.168.1.100
4、重启服务
Service named restart
Service sendmail restart
Service xinetd restart
补:启用smtp认证
1、 安装相关模块
Rpm -qa | grep sasl
Linux盘中:RedHat--〉RPMS-->sasl*
2、 修改 /etc/mail/sendmail.mc(sendmail.cf的源代码)
Vi /etc/mail/sendmail.mc
查询:43 TRUST_AUTH*
:44
:85 DAEMON_OPTION*
:92 DAEMON*
注:去掉dnl(注释)
3、 生成sendmail.cf
M4 sendmail.mc >sendmail.cf
4、删除部分中继,以免开后门
5、客户机
我的服务器要求身份验证
ouyangchangyou 于 2013-12-16 21:59:57发表:
附件了。。。违规了
MrYxSen 于 2013-12-04 19:32:22发表:
我们还没有学到这里
yaoxinrisk 于 2013-12-02 20:00:22发表:
怎们看不到附件的??
cl2683112 于 2013-08-13 14:29:19发表:
学习来了哦
hlhlinux 于 2012-10-05 00:05:05发表:
楼主,没你这样的吧
linj2000 于 2012-10-03 23:36:39发表:
看不到内容
fz15004627 于 2009-08-12 22:42:18发表:
为什么会出现违规呢?
ysjsssdc 于 2009-08-12 09:40:17发表:
楼主发贴违规了,看不到内容
jjwspj 于 2009-05-22 19:01:22发表:
不错,感谢lz的分享