我正在尝试使用带有NTLM或GSSAPI身份验证的MSMTP发送电子邮件。这在使用 NTLM 身份验证时工作正常,但在使用 GSSAPI 时失败。
msmtp --version
输出
msmtp version 1.6.6
Platform: x86_64-pc-linux-gnu
TLS/SSL library: GnuTLS
Authentication library: GNU SASL
Supported authentication methods:
plain scram-sha-1 external gssapi cram-md5 digest-md5 login ntlm
IDN support: enabled
NLS: enabled, LOCALEDIR is /usr/share/locale
Keyring support: none
System configuration file name: /etc/msmtprc
User configuration file name: /home/XXXX/.msmtprc
用于发送电子邮件的命令
printf "Subject: Using GSSAPInnTest message 1 using GSSAPI." | msmtp userid@somedomain.name
错误信息
msmtp: GNU SASL: GSSAPI error in client while negotiating security context in gss_init_sec_context() in SASL library. This is most likely due insufficient credentials or malicious interactions.
msmtp: could not send mail (account default from /etc/msmtprc)
系统配置文件
auth gssapi
timeout 10
tls on
#tls_trust_file /etc/ssl/certs/ca-certificates.crt
tls_certcheck off
logfile /var/log/xxxx/msmtp.log
host <<hostname>>
port 587
from username@somedomain.name
user username@somedomain.name
password <<password>>
想知道我是否缺少任何配置步骤/命令或实施错误。非常感谢任何善意的帮助。提前谢谢。
SASL将委托给MIT Kerberos/Heimdal。您需要先做一个kinit
。导出KRB5_TRACE=/dev/stderr
,您将看到MIT Kerberos所做的。