'
E、启动authlib
[root@localhost ~]# service courier-authlib start
Starting Courier authentication services: authdaemond
[root@localhost ~]# chmod 777 /var/spool/authdaemon/
4、安装courier-imap
[root@localhost ~]# rpm -ivh courier-imap-4.1.2-1.i386.rpm
[root@localhost ~]# service courier-imap start
5、安装cyrus-sasl
A、安装SRPM
[root@localhost i386]# rpm -e --nodeps cyrus-sasl-devel cyrus-sasl-plain cyrus-sasl cyrus-sasl-lib (如果这些包存在)
[root@localhost i386]# rpm -ihv cyrus-sasl-lib-2.1.22-5.el5.i386.rpm
[root@localhost i386]# rpm -ihv cyrus-sasl-2.1.22-5.el5.i386.rpm
[root@localhost i386]# rpm -ihv cyrus-sasl-plain-2.1.22-5.el5.i386.rpm
B、配置sasl2
创建/usr/lib/sasl2/smtpd.conf 文件,输入下面的内容:
pwcheck_method:authdaemond
log_level:3
mech_list:PLAIN LOGIN
authdaemond_path:/var/spool/authdaemon/socket
6、安装postfix
A、安装软件包
[root@localhost i386]# rpm -ivh postfix-2.5.4-2.rhel4.i386.rpm
B、切换mta
[root@localhost i386]# alternatives --config mta (选择2,postfix)
[root@localhost i386]# rpm -e sendmail
[root@localhost i386]# cd /usr/sbin/
[root@localhost sbin]# mv sendmail sendmail.bak
[root@localhost sbin]# newaliases
[root@localhost sbin]# ln -s sendmail.postfix sendmail
C、配置postfix
[root@localhost ~]# cd /etc/postfix/
[root@localhost postfix]# mv main.cf main.cf.bak
[root@localhost postfix]# vim main.cf
输入下面的内容:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 550
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = /usr/share/doc/postfix-2.5.2-documentation/html
manpage_directory = /usr/share/man
sample_directory = /etc/postfix
readme_directory = /usr/share/doc/postfix-2.5.2-documentation/readme
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
myhostname = mail.uucun.lan
mydomain = uucun.lan
mydestination = $myhostname
smtpd_banner = uucun.lan ESMTP Mail System
message_size_limit = 14680064
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_base = /home/data/domains
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_limit_maps.cf
virtual_transport = maildrop:
maildrop_destination_recipient_limit = 1
#sasl
smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_s
|