CentOS下Postfix的安装
[21CTO版权所有 未经允许不得转载]
CentOS上安装Postfix在网上资料不算很多,还有一些手册有一些问题。
本文将介绍如何在CentOs下安装Posfix的方法,包括发信检验。
1. 使用yum安装。
yum install postfix
2. 将系统的默认的更改为Postfix。
/etc/init.d/sendmail stop
chkconfig –del sendmail
alternatives –config mta
3. main.cf文件设置
vi /etc/postfix/main.cf
# myhostname - 主机名
myhostname = host.example.com
# mydomain - 域名
mydomain = example.com
# myorigin - 发信人定义
# user@example.com 可以为域名 myorigin = $mydomain
# user@host.example.com 也可以使用主机名(二级域) myorigin = $myhostname
myorigin = $mydomain
# inet_interfaces - 设置收信界面
inet_interfaces = all
# mydestination - 发信来源定义
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks_style = subnet
# mynetworks
mynetworks = 127.0.0.0/8
smtpd_banner = $myhostname ESMTP unknown
# 邮件保存地址
home_mailbox = Maildir/
alias_maps = hash:/etc/aliases
// SMTP-Auth设置
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
broken_sasl_auth_clients = yes
4. SMTP-Auth设置
vi /usr/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd
mech_list: plain login
5. 系统自动启动设置
/etc/init.d/saslauthd start
chkconfig saslauthd on
/etc/init.d/postfix start
chkconfig postfix on
6. 清理yum
yum clean packages
04月 3rd, 2009 at 13:35 #蔚蓝网
您好
想和你博客做个链接不知道行不?
已经做好了你的连接哦 ^_^
博客名称: 蔚蓝网
博客地址: http://www.wei40.cn/