我有一个奇怪的问题。我遵循了一些来自网络的指南。我的目标是创建一个 SMTP 后缀,该后缀将使用 Cyrus SASL 在使用不同 imap 服务器发送电子邮件时对用户进行身份验证。
让一切变得更简单:必须用新的服务器转移/替换当前的 smtp 服务器,因为当前服务器位于公共云上并且经常进入黑名单。
到目前为止,我管理的是:使用 Postfix 身份验证时工作:
testsaslauthd -u user@domain.com -p password
我得到了“成功”,所以我认为 sasl 本身可以工作。
当我调用 saslfinger -s 我得到:
没有定义 SASL 应该为 Postfix 做什么的 smtpd.conf。SMTP AUTH 不能工作!
但似乎在配置文件中一切都很好:
/etc/postfix/sasls/smtp.conf:
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
/etc/postfix/main.cf:
smtpd_recipient_restrictions = reject_invalid_hostname,
permit permit_mynetworks,
permit_sasl_authenticated
disable_vrfy_command = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
/etc/default/saslauthd-后缀:
START=yes
MECHANISMS="rimap"
MECH_OPTIONS="domain.com -r"
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"
我正在运行 postfix chroot'ed 所以必须创建一个符号链接,但就像我说的那样。这一切似乎都是独立工作的,只需要以某种方式联系起来。当我尝试在 Outlook 中设置帐户时,我得到了错误的名称或密码。Debian 上的日志说:
May 11 23:35:43 smtp-test postfix/smtpd[741]: warning: unknown[192.168.108.1]: SASL NTLM authentication failed: authentication failure
May 11 23:35:43 smtp-test postfix/smtpd[741]: warning: SASL authentication failure: unable to canonify user and get auxprops
May 11 23:35:43 smtp-test postfix/smtpd[741]: warning: unknown[192.168.108.1]: SASL DIGEST-MD5 authentication failed: authentication failure
May 11 23:35:43 smtp-test postfix/smtpd[741]: warning: unknown[192.168.108.1]: SASL LOGIN authentication failed: authentication failure
May 11 23:35:43 smtp-test postfix/smtpd[741]: lost connection after AUTH from unknown[192.168.108.1]
May 11 23:35:43 smtp-test postfix/smtpd[741]: disconnect from unknown[192.168.108.1]
奇怪的是它尝试 NTLM(未在任何地方提及)而不是 RIMAP。并且即使添加了应该结合名称和领域/域名的 -r 开关,也无法制作用户的规范名称。我想这与 saslfinger 的第一次警告有关,但找不到原因。所有更新到最新的可用版本。有什么帮助吗?