我正在尝试将我的家庭服务器配置为中继来自家庭 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
好吧,这是罪魁祸首:
没有必要,而且确实有害,因为无法将愚蠢的 iPhone 配置为提供客户端证书。一旦我删除了上述行,身份验证就开始对提供令人满意的证书的对等方和提供预共享凭据的对等方起作用
CRAM-MD5
。(这
AUTH_OPTIONS
部分被证明是无关紧要的。)