1 将sendmail服务停止
[root@mail ~]# service sendmail
stop //停止sendmail服务
Shutting down sm-client: [ OK ]
Shutting down sendmail: [ OK ]
Yum配置
vi /etc/yum.respos.d/rhel-debuginfo.rego
baseurl=file:///cdrom/Server
enabled=1
gpgcheck=1
2 安装配置dns (略)
[root@localhost named]# yum -y
install caching-nameserver bind-chroot
配置请参加DNS的安装与配置
MX记录
mail IN A 172.16.41.180
IN MX 10 MAIL.159.CN.
3 安装postfix
[root@localhost ~]# cd
/media/RHEL_5.5\ i386\ DVD/Server/
[root@localhost Server]# rpm -ivh
postfix-2.3.3-2.1.el5_2.i386.rpm
YUM安装
[root@localhost named]# yum -y
install postfix
4 配置postfix
[root@mail ~]# vim/etc/postfix/main.cf
myhostname = mail.159.cn
mydomain = 159.cn
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, $mydomain
mynetworks = 172.16.42.0, 127.0.0.0/8
relay_domains = 159.cn
wq—退出
5
service postfix start
[root@mail ~]# vim
/etc/postfix/main.cf
alias_maps =
hash:/etc/aliases
alias_database = hash:/etc/aliases
//检查postfix配置文件中有这两条
[root@mail ~]# vim
/etc/aliases //配置用户别名
mail: mail,mail1,mail2,mail3
[root@mail ~]# postalias
/etc/aliases
[root@mail ~]# postfix
reload
postfix/postfix-script: refreshing the Postfix mail system
6 配置smtp
[root@mail ~]# rpm -qa|grep
sasl
cyrus-sasl-plain-2.1.22-5.el5_4.3
cyrus-sasl-lib-2.1.22-5.el5_4.3
cyrus-sasl-2.1.22-5.el5_4.3
[root@mail ~]# saslauthd
-v
saslauthd 2.1.22
authentication mechanisms: getpwent kerberos5 pam rimap shadow
ldap
[root@mail ~]# vi /etc/sysconfig/saslauthd
MECH=shadow //将认证方式改为shadow
[root@mail ~