Postfix:由于 ESMTP 而拒绝中继访问

Postfix:由于 ESMTP 而拒绝中继访问

我已经设置了 mailman 和 postfix,但是邮件无法通过邮件列表发送。Postfix 拒绝它,因为收件人域未添加到postfix_domains

这是我的main.cf

recipient_delimiter = +
unknown_local_recipient_reject_code = 500
owner_request_special = no
myhostname = develop.product.company.com
mynetworks = 10.92.5.5/16

# Increase deferred mail delivery frequency
queue_run_delay = 60s
minimal_backoff_time = 30s
maximal_backoff_time = 120s
# BEGIN ANSIBLE MANAGED BLOCK
recipient_delimiter = +
unknown_local_recipient_reject_code = 500
owner_request_special = no
transport_maps =  hash://opt/mailman/var/data/postfix_lmtp
local_recipient_maps =  hash://opt/mailman/var/data/postfix_lmtp
relay_domains = hash://opt/mailman/var/data/postfix_domains
# END ANSIBLE MANAGED BLOCK

Mailman 中的邮件列表已在domain1.com和中创建domain2.com,文件postfix_domains如下所示:

# AUTOMATICALLY GENERATED BY MAILMAN ON 2017-02-09 02:43:51
#
# This file is generated by Mailman, and is kept in sync with the binary hash
# file.  YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you know what you're
# doing, and can keep the two files properly in sync.  If you screw it up,
# you're on your own.

domain1.com domain1.com
domain2.com domain2.com

当我尝试向该邮件列表(其中有订阅者)发送邮件时[email protected],出现以下错误:

postfix/smtpd[8110]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<ip-10-92-34-5.ap-northeast-1.compute.internal>

我运行以下命令postconf -d | grep "smtpd_r"以获得以下结果:

postscreen_reject_footer = $smtpd_reject_footer
smtpd_recipient_limit = 1000
smtpd_recipient_overshoot_limit = 1000
smtpd_recipient_restrictions =
smtpd_reject_footer =
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = no
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination
smtpd_restriction_classes =

我读过论坛中提出的类似问题,但我没有找到这样的确切问题。有人能帮我解决这个问题吗?

谢谢你!

答案1

授权网络的定义我的网络配置参数主配置文件

当您从本地主机发送电子邮件时:

postfix/smtpd[8110]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<ip-10-92-34-5.ap-northeast-1.compute.internal>

您必须允许 postfix 转发来自本地主机的电子邮件。编辑主配置文件添加:

mynetworks = 127.0.0.0/8

相关内容