Sendmail:调试传出 SMTP 会话

Sendmail:调试传出 SMTP 会话

已经折腾了一天了,还是没找到解决办法。尝试向某些主机发送邮件时:

Jan  5 10:31:37 vps**** sm-mta[2192]: STARTTLS=client, relay=mail-x.*****.co.uk., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jan  5 10:31:37 vps**** sm-mta[2192]: u059Vb4d002190: to=<****@****.co.uk>, ctladdr=<root@vps****.ovh.net> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=124764, relay=mail-x.****.co.uk. [212.46.138.29], dsn=5.1.8, stat=Service unavailable

经过一番研究发现,可能是 TLS 问题,因此尝试禁用并添加:

Try_TLS:   NO

但后来我得到:

Jan  5 10:33:56 vps**** sm-mta[2375]: ruleset=try_tls, arg1=mail-x.****.co.uk, relay=mail-x.****.co.uk, reject=550 5.7.1 <****@****.co.uk>... do not try TLS with mail-x.****.co.uk [212.46.138.29]
Jan  5 10:33:56 vps**** sm-mta[2375]: u059XuVY002373: to=<****@****.co.uk>, ctladdr=<root@vps****.ovh.net> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=124764, relay=mail-x.****.co.uk. [212.46.138.29], dsn=5.1.8, stat=Service unavailable

我的 sendmail 版本和设置:Ubuntu 上的 8.14.4

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = vps****
(canonical domain name) $j = vps****.ovh.net
(subdomain name) $m = ovh.net
(node name) $k = vps****.ovh.net
========================================================

有任何想法吗?


附加信息

以详细模式发送测试消息产生以下错误:

554 5.1.8:发件人地址被拒绝:未找到 MX 记录

答案1

Sendmail:调试传出 SMTP 会话

以 root 身份发送一条带有 SMTP 会话完整跟踪的测试消息。
通常它会提供一些有用的提示。

#!/bin/sh

RECIPIENT='****@****.co.uk'

# -i  : sendmail will rewrite lines starting with dot
# -Am : use sendmail.cf instead of submit.cf (usually requires root privileges) 
# -v  : use verbose mode (track SMTP session to STDERR)
# --  : separate command line arguments and recipients list
/usr/sbin/sendmail -i -Am -v -- $RECIPIENT <<END
Subject: test message
To: $RECIPIENT

test message body   
END

sendmail.sendmail(8) - 手册页

相关内容