我有一个很好的设置来验证PAM的身份。它似乎在做它的事情:
root@sasltest:~# testsaslauthd -u quest -p #### -s smtp
0: OK "Success."我有libsasl 2.1.23,后缀2.7.1。
我配置了一个后缀:
smtpd_sasl_type = cyrus
smtpd_sasl_path = /var/spool/postfix/private/saslauthd/mux
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous因此,使用master.cf:
submission inet n - - - - smtpd
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject但是,试图在此后缀中进行身份验证会给出以下错误消息:
Jan 23 22:13:14 sasltest postfix/smtpd[1252]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Jan 23 22:13:14 sasltest postfix/smtpd[1252]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Jan 23 22:13:14 sasltest postfix/smtpd[1252]: warning: X[A.B.C.D]: SASL LOGIN验证失败:身份验证失败
同时,我的调试日志记录程序没有输出。
我将此解释为libsasl2试图使用sasldb auth而不是尝试与saslauthd对话。我想不出怎么告诉libsasl我想让它和saslauthd说话。
各种说明通知您创建一个文件/etc/sasl 2/smtpd.conf或/etc/后缀/sasl/smtpd.conf。我尝试过创建这些文件,其中包括:
pwcheck_method: saslauthd
mech_list: LOGIN PLAIN但没有效果。
如何指示libsasl使用saslauthd身份验证?
(当然,我可以创建/var/spool/后缀/etc/sasldb2 2,但这仍然不会导致连接到saslauthd)。
发布于 2020-12-27 12:10:23
在Ubuntu 20.04类似的问题上绊倒了。在那里,根本无法识别后缀的cyrus_sasl_config_path参数。它正在查找/etc/后缀/sasl2 2/以代替包含smtpd.conf。
在Ubuntu20.04中,smtpd在默认情况下似乎是彩色的。但是,它在/usr/lib/后缀/配置-instance.sh中的chroot准备脚本没有覆盖任何与SASL相关的文件,因此必须手动将其放入chroot中。
发布于 2020-10-22 16:17:00
我在这个问题上挣扎了大约一个小时,然后通过strace -f -p pid处理正在运行的后缀进程,它找不到我的sasldb2文件,因为它把自己放到了一个chroot中。
编辑/etc/postfix/master.cf并在chroot列中放置一个n。重新启动后缀。现在应该能用了。
https://serverfault.com/questions/471887
复制相似问题