【发布时间】:2015-05-28 10:49:04
【问题描述】:
我正在尝试通过运行postfix 作为 smtp 服务器的远程虚拟机发送电子邮件。
但是,我在发送 rcpt cmd 时收到 554 - Relay access denied 错误。
(554, b'5.7.1 <xxxxx@xyz.org>: Relay access denied')
我知道它拒绝了我尝试设置为收件人的电子邮件地址,但我不明白为什么。
套接字连接本身建立良好,我可以在尝试 rcpt 之前发送 mail cmd。
环境详情:
主机:
Windows 7 机器/语言:Python 3。
来宾虚拟机:
Docker 容器 (Ubuntu) VM 运行
postfix、ssh-- 使用 dhcp 分配的 IP 地址10.35.50.166。
这是正在运行的python 代码:
(在主机上):
import smtplib
server = smtplib.SMTP(host='10.35.50.166', port=8025)
server.mail('xxxxx@xyz.org')
(250, b'2.1.0 Ok')
server.rcpt('xxxxx@xyz.org')
(554, b'5.7.1 <xxxxx@xyz.org>: Relay access denied')
从guest机器运行,没有发生错误:
import smtplib
server = smtplib.SMTP(host='localhost', port=8025)
server.mail('xxxxx@xyz.org')
(250, b'2.1.0 Ok')
server.rcpt('xxxxx@xyz.org')
(250, b'2.1.5 Ok')
【问题讨论】:
-
3 月 24 日 22:57:38 04305ce1d661 后缀/smtpd[25121]:NOQUEUE:拒绝:来自未知 [172.17.42.1] 的 RCPT:554 5.7.1
:中继访问否认;从= 到= proto=SMTP
标签: smtp postfix-mta