Debian系统中Postfix安装sasl的方法
思韵闪耀
2013-03-18
0

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

参考:
1。OReilly - 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


【版权声明】
本站部分内容来源于互联网,本站不拥有所有权,不承担相关法律责任。如果发现本站有侵权的内容,欢迎发送邮件至masing@13sy.com 举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。

相关内容

Linux系统挂载未分配硬...
先查看未挂载之前的磁盘使用情况发现磁盘使用率已经达到了96%,迫切...
2025-02-22
Linux lsblk 命...
简介Linux 中的 lsblk 命令,全称叫做:list blo...
2025-02-22
linux内核5和6区别
Linux内核5.x和6.x版本之间有显著的区别,这些区别主要体现...
2024-04-29
docker-compos...
1.Compose介绍 DockerCompose是一个用来定义和...
2024-04-26
Linux中的防火墙(Ne...
NetfilterNetfilter是Linux 2.4内核引入的...
2024-03-15
firewall-cmd ...
firewalld的简要说明:firewalld 、firewal...
2024-03-15

热门资讯

Roundcube 配置过各提... Fileinfo/mime_content_type configuration: OK Mimet...
搭建PostfixAdmin ... 一、原理及其应用: 笔者之前就职在上海一家信息公司,至力于全面的电子邮件营销解决方案,公司中等规模,...
在wdos系统下搭建postf... 一.简介: 1. wdOS是一个基于CentOS版本精简优化过的Linux服务器系统,大部分保留着c...
RHEL5系统中安装Postf... 前提1:安装RHEL5时把所有的开发工具装上。 原理图 前提2 :开始前请确保您已经配置好指向此邮件...
Linux停止和启动postf... 1.启动Postfix服务 启动Postfix服务的命令为: /etc/init.d/postfix...