Postfix + sasl 方法 rimap 从用户那里剥离域名

Hal*_*aar 8 postfix saslauthd sasl

我正在使用 Postfix 和 Courier-IMAP 设置邮件服务器。我想使用 rimap 进行 SMTP 身份验证,这样我就不必维护两个用户数据库。我遇到的问题是,用户名后缀传递的域名被剥离了。它应该是“john@domain.com”,然后变成“john”。

登录 IMAP 服务器有效,testsaslauthd -u john@domain.com -p password.

使用smtpd_sasl_local_domain(设置或取消设置)没有区别。

这个帖子好像不行。即使我尝试使用 uasdfer@asdfasdf 登录,它也会剥离域部分。

后缀 sasl:

# cat main.cf |grep -i sasl
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_rbl_client zen.spamhaus.org check_policy_service unix:private/policyd-spf
Run Code Online (Sandbox Code Playgroud)

萨尔配置:

# cat saslauthd |grep -v "#"|grep -v -E "^$"
START=yes
DESC="SASL Authentication Daemon"
NAME="saslauthd"
MECHANISMS="rimap"
MECH_OPTIONS="127.0.0.1"
THREADS=5
OPTIONS="-c -m /var/run/saslauthd"
Run Code Online (Sandbox Code Playgroud)

服务器版本:

  • Debian 6.0.7
  • Postfix 2.7.1-1+squeeze1
  • 快递 4.8.0-3

Nic*_*ckW 9

您可能只需要添加-r到您的 saslauthdOPTIONS=节。

手册页

 -r          Combine the realm with the login (with an ’@’ sign in between).  
             e.g.  login: "foo" realm: "bar" will get passed as login:
             "foo@bar".  Note that the realm will still be passed, which may
             lead to unexpected behavior.
Run Code Online (Sandbox Code Playgroud)