星空网 > 软件开发 > 操作系统

【转】Linux 下搭建Postfix邮件服务器详解:

在我自己的服务器上面搭建了邮件服务器,为的是接下来写shell脚本进行报警监控。当服务器发生意外,可以及时发送邮件服务器到邮箱。

看了两个教程,按照两个教程来搭建的,感谢原作。

Linux 下搭建Postfix邮件服务器详解:

1、首先关闭sendmail服务

service sendmail stop

2、chkconfig sendmail off(关闭开机自启动)

3、修改DNS正解文件,使DNS能够解析邮箱服务

添加下面两行

mail.zhubf.com. IN A            172.17.17.2

zhubf.com.      IN MX  10      mail.zhubf.com.

重启DNS服务

service named  restart

chkconfig named on

echo "" > /etc/resolv.conf

测试DNS设置是否正确

host mail.zhubf.com

mail.zhubf.com has address 172.17.17.2

4安装postfix 软件包(前提安装yum,配置yum源)

yum install -y postfix

修改postfix配置文件

vim /etc/postfix/main.cf

主要内容如下

【转】Linux 下搭建Postfix邮件服务器详解:images/loading.gif' data-original="http://images2015.cnblogs.com/blog/608476/201601/608476-20160108193730106-310328304.png" />

【转】Linux 下搭建Postfix邮件服务器详解:

5、配置saslauthd,这个软件默认是安装的

修改saslauthd 配置文件

vi /etc/sysconfig/saslauthd

设置MECH=shadow

service saslauthd restart

chkconfig saslauthd on

创建邮箱用户

useradd zhubf

passwd  zhubf

echo zhubf |passwd --stdin zhubf

进行密码验证测试

testsaslauthd -u zhubf -p 'zhubf'

0: OK "Success."

若没有通过,可能是防火墙或selinux的设置问题。

在postfix的主配置文件/etc/postfix/main.cf添加如下权限设置

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain = ''

smtpd_recipient_restrictions =

permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination

broken_sasl_auth_clients = yes

smtpd_client_restrictions = permit_sasl_authenticated

smtpd_sasl_security_options = noanonymous

重启postfix 服务

service postfix restart

chkconfig postfix on

另外一个辅助教程是:http://www.cnblogs.com/dudu/archive/2012/12/12/linux-postfix-mailserver.html

写得很好。




原标题:【转】Linux 下搭建Postfix邮件服务器详解:

关键词:linux

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

出口货运多少钱:https://www.goluckyvip.com/tag/102099.html
产品没有销量:https://www.goluckyvip.com/tag/1021.html
独立站封店:https://www.goluckyvip.com/tag/10210.html
查询国际快递偏远地区的网站:https://www.goluckyvip.com/tag/102100.html
国际单号查询快递:https://www.goluckyvip.com/tag/102101.html
国际单号快递查询:https://www.goluckyvip.com/tag/102102.html
2024.04.18亚马逊选品推荐(仅供参考):女装蛋糕连衣裙:https://www.kjdsnews.com/a/1842234.html
欧洲市场疯了,订单排到7、8月!:https://www.kjdsnews.com/a/1842235.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流