postfix

7.安装postfix
#useradd postfix
#useradd postdrop
#useradd vmail
#tar zxvf postfix-2.3.2.tar.gz
#cd postfix-2.3.2
#make makefiles CCARGS='-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE="dovecot"'
#make
#make install    //一路回车
8.配置postfix
#mkdir /etc/dovecot
#vi /etc/dovecot/passwd
test@scm5.***.cn:{plain}pass:5000:5000::/var/spool/vhosts/scm5.***.cn/test/
test2@scm5.***.cn:{plain}pass:5000:5000::/var/spool/vhosts/scm5.***.cn/test2/
#vi /etc/postfix/main.cf
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
virtual_mailbox_domains = /etc/postfix/vdomains
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_mailbox_base = /var/spool/vhosts/
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_alias_maps = hash:/etc/postfix/valias
#vi /etc/postfix/vdomains
scm5.***.cn
#vi /etc/postfix/vmailbox
test@scm5.***.cn scm5.***.cn/test/
test2@scm5.***.cn scm5.***.cn/test2/
#mkdir /var/spool/vhosts
#chown vmail.vmail /var/spool/vhosts
#postmap /etc/postfix/vmailbox
#postmap /etc/postfix/valias
10.安装maildrop
#tar jxvf maildrop-2.0.4.tar.bz2
#cd maildrop-2.0.4
#./configure --enable-sendmail=/usr/sbin/sendmail --enable-trusted-users='root vmail' --enable-syslog=1 --enable-maildrop-uid=vmail --enable-maildrop-gid=vmail --disable-authlib
#make;make install
11.配置maildrop
#vi /etc/postfix/mail.cf
#vi /etc/postfix/master.cf
#vi /etc/maildroprc
9.重启postfix服务
#postfix check
#postfix reload

你可能感兴趣的:(postfix)