背景:
我们有一家网上商店,使用 SMTP 服务器发送消息。当客户下订单时,系统会将确认信息发送到客户的地址(A),并将副本发送到在同一 SMTP 服务器上注册的另外两个帐户(B 和 C)。
问题:
如果客户输入了错误的电子邮件地址(例如:[email protected]
<--请注意应该是com
),它会退回整个组,并且(B)和(C)都不会收到该消息。
日志:
Apr 25 10:12:37 smtp_server postfix/smtpd[8153]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 450 4.1.2 <[email protected]>: Recipient address rejected: Domain not found; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<localhost>
Apr 25 10:12:37 smtp_server amavis[12654]: (12654-06) (!)mail_via_smtp: NOTICE: aborting SMTP session, Bail out, DATA accepted but tempfailed recips, not a LMTP input at (eval 134) line 979.
Apr 25 10:12:37 smtp_server amavis[12654]: (12654-06) (!)FWD from <[email protected]> -> <[email protected]>,<[email protected]>,BODY=7BIT 451 4.5.0 From MTA(smtp:[127.0.0.1]:10025) during fwd-data-chkpnt (Bail out, DATA accepted but tempfailed recips, not a LMTP input at (eval 134) line 979.): id=12654-06
Apr 25 10:12:37 smtp_server amavis[12654]: (12654-06) Blocked MTA-BLOCKED {TempFailedOpenRelay}, [111.222.111.222]:41916 [111.222.111.222] <[email protected]> -> <[email protected]>,<[email protected]>, Queue-ID: 4DA411806E13C, Message-ID: <[email protected]>, mail_id: DZSKWfuau0Pu, Hits: 0.8, size: 745, 3627 ms
Apr 25 10:12:37 smtp_server postfix/smtp[31968]: 4DA411806E13C: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.8, delays=0.17/0/0/3.6, dsn=4.1.2, status=deferred (host 127.0.0.1[127.0.0.1] said: 450 4.1.2 id=12654-06 - Temporary MTA failure on relaying, from MTA(smtp:[127.0.0.1]:10025): 450 4.1.2 <[email protected]>: Recipient address rejected: Domain not found (in reply to end of DATA command))
预期的:
无论 (A) 地址是否错误,(B) 和 (C) 都应该收到电子邮件。
笔记:
如果我从个人电脑向这些帐户发送电子邮件(包括收件人、抄送或密件抄送),也会发生同样的情况。因此,我断定邮件服务器可以采取一些措施。
postfix 或 amavis 中是否存在任何设置可以阻止这种情况发生,或者我应该添加什么设置才能使其正常工作?
答案1
我遇到了同样的问题。我通过添加拒绝时发出警告在...前面拒绝未知收件人域名在我的smtpd_recipient_restrictions