认证成功,但发送仍然失败

认证成功,但发送仍然失败

我正在尝试配置我的家庭服务器以中继来自家人的 iPhone 的电子邮件。为此,我在服务器的 SASL 数据库中创建了一个“用户”帐户,并将 sendmail 配置为使用 CRAM-MD5 作为唯一的 SASL 机制。在日志(高详细级别)中,sendmail 表示:

AUTH: available mech=CRAM-MD5, allowed mech=EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5

当 iPhone 连接时,它的身份验证尝试似乎成功(见下文交流)。然而,电子邮件还是被拒绝了,这让我完全困惑不已……

<-- EHLO [192.168.1.171]
--- 250-symbion.example.com Hello ... [...], pleased to meet you
--- 250-ENHANCEDSTATUSCODES
--- 250-PIPELINING
--- 250-8BITMIME
--- 250-SIZE
--- 250-DSN
--- 250-AUTH CRAM-MD5
--- 250-STARTTLS
--- 250-DELIVERBY
--- 250 HELP
<-- AUTH CRAM-MD5
--- 334 PDEzOT....dG1hbi5jb20+
--- 235 2.0.0 OK Authenticated
<-- MAIL FROM:<[email protected]>
Authentication-Warning: symbion.example.com: Host ... [...] claimed to be [192.168.1.171]
--- 403 4.7.0 authentication required
ruleset=check_mail, arg1=<[email protected]>, relay=... [...], reject=403 4.7.0 authentication required
<-- RCPT TO:<info@......>
--- 503 5.0.0 Need MAIL before RCPT
<-- DATA
--- 503 5.0.0 Need MAIL command
<-- QUIT
--- 221 2.0.0 symbion.example.com closing connection

我的access数据库不大:

CERTISSUER:/MY/OWN/Certificate/Authority   RELAY
TLS_Clt:127.0.0.1       OK
TLS_Clt:192.168.1       OK
TLS_Clt:        VERIFY:112
Try_TLS:127.0.0.1       NO
Try_TLS:192.168.1       NO
Connect:192.168.1       RELAY
Connect:127.0.0.1       RELAY
Srv_Features:127.0.0.1  S A V
Srv_Features:192.168.1  S A V
Srv_Features:   s a v

与本地调用的 sendmail 相同:

% sendmail -O LogLevel=14 -bs -Am
220 symbion.example.com ESMTP Sendmail 8.15.2/8.15.2; Fri, 27 Oct 2017 01:02:25 -0400 (EDT)
AUTH CRAM-MD5
334 PDEwM....vbT4=
cmlvc0BzeW1ia...JhYjU5
235 2.0.0 OK Authenticated
MAIL FROM: mi@meow
403 4.7.0 authentication required

答案1

好的,这就是罪魁祸首:

TLS_Clt:        VERIFY:112

没有必要,而且确实有害,因为愚蠢的 iPhone 无法配置为提供客户端证书。一旦我删除了上面的行,身份验证就开始起作用了两个都对于出示令人满意的证书的同行,对于那些提供预共享凭证的人来说CRAM-MD5

AUTH_OPTIONS事实证明这部分无关紧要。)

相关内容