debian 给postfix安装sasl的方法

王朝other·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

(使用pwcheck_method: auxprop,即不是使用系统/etc/passwd中的帐号密

码)

参考:

1。O'Reilly - Postfix The Definitive Guide

2。http://wiki.debian.org.tw/index.php/Postfix-SASL

3。http://www.postfix.org/SASL_README.html

1。安装好postfix系统(略)

2。apt-get install postfix-tls sasl2-bin libsasl2-modules

3。mkdir -p /etc/postfix/sasl

4。echo "pwcheck_method: auxprop" /etc/postfix/sasl/smtpd.conf

5。在/etc/postfix/mail.cf中加入

smtpd_sasl_auth_enable = yes

broken_sasl_auth_clients = yes

smtpd_sasl_security_options = noanonymous

smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks,

check_relay_domains, reject_unauth_destination

smtpd_client_restrictions = permit_sasl_authenticated

6。修改/etc/postfix/master.cf(也就是说讓 Postfix 不要以 chroot 啟動)

把smtp inet n - - - - smtpd

改为:

smtp inet n - n - - smtpd

7。chown postfix:sasl /etc/sasldb2

8。chmod 440 /etc/sasldb2

9。saslpasswd2 -c -u `postconf -h myhostname` test(建立一个帐号test)

(使用该命令后,会提示你输入这个帐号的密码,有点象linux的添加用户命令adduser)

10。/etc/init.d/postfix restart

然后就可以在 foxmail 中用这个帐号测试

提示:

1。saslpasswd2 建立的帐号可以使用sasldblistusers2 查看

saslpasswd2 -c -u 创建用户的时候,要指定一个后缀

如果saslpasswd2 -c -u `postconf -h myhostname` test 创建的test 在foxmail中的帐号可以只写test

但是

如果saslpasswd2 -c -u xxxxx.com test的话

那么foxmial中的帐号就要写全为test@xxxxx.com

如果saslpasswd2 -c test

你可以是使用sasldblistusers2 查看一下这个帐号的后缀是什么

记得在foxmail中的帐号要写全称

2。如果想postfix 只使用一种认证机制,可以在/etc/postfix/sasl/smtpd.conf中修改

例如:我想postfix只支持2中认证plain login

可以在/etc/postfix/sasl/smtpd.conf文件中加入

mech_list: plain login

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航