12 smtp postfix authentication sasl
我尝试使用 smtp 身份验证设置 postfix。我想使用 /etc/shadow 作为我的领域
不幸的是,当我尝试进行身份验证时出现“一般错误”
# nc localhost 25
220 mail.foo ESMTP Postfix
AUTH PLAIN _base_64_encoded_user_name_and_password_
535 5.7.8 Error: authentication failed: generic failure
Run Code Online (Sandbox Code Playgroud)
在mail.warn日志文件中,我得到以下条目
Oct 8 10:43:40 mail postfix/smtpd[1060]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Oct 8 10:43:40 mail postfix/smtpd[1060]: warning: SASL authentication failure: Password verification failed
Oct 8 10:43:40 mail postfix/smtpd[1060]: warning: _ip_: SASL PLAIN authentication failed: generic failure
Run Code Online (Sandbox Code Playgroud)
但是 sasl 设置似乎没问题
$ testsaslauthd -u _user_ -p _pass_
0: OK "Success."
Run Code Online (Sandbox Code Playgroud)
我添加smtpd_sasl_auth_enable = yes到 main.cf
这是我的 smtpd.conf
$ cat /etc/postfix/sasl/smtpd.conf
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
saslauthd_path: /var/run/saslauthd/mux
autotransition:true
Run Code Online (Sandbox Code Playgroud)
我用最后两个命令尝试了这个 conf,没有。
我正在运行 debian stable。
postfix 如何找到并连接到 saslauthd 服务器?
编辑:
我不确定 postfix 是否在 chroot 中运行 master.cf 看起来像这样:http : //pastebin.com/Fz38TcUP
saslauth位于sbin
$ which saslauthd
/usr/sbin/saslauthd
Run Code Online (Sandbox Code Playgroud)
EHLO 有这个回应
EHLO _server_name_
250-_server_name_
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
Run Code Online (Sandbox Code Playgroud)
您是否缺少从 /var/run/saslauthd 到 /var/spool/postfix/var/run/saslauthd 的符号链接?
从我的工作系统:
root@mail:/etc/postfix/sasl# ls -la /var/run/saslauthd
lrwxrwxrwx 1 root root 36 Dec 31 2010 /var/run/saslauthd -> /var/spool/postfix/var/run/saslauthd
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
24374 次 |
| 最近记录: |