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
當我嘗試向該郵件列表(其中
persona@company.com
是訂閱者)發送郵件時,我收到以下錯誤:postfix/smtpd[8110]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 454 4.7.1 <persona@company.com>: Relay access denied; from=<testing-mailinglist-bounces@domain1.com> to=<persona@company.com> 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 =
我已經閱讀了在這個論壇上提出的類似問題,但我沒有找到這樣一個確切的問題。有人可以幫我解決這個問題嗎?
謝謝!
授權網路使用main.cf中的**mynetworks配置參數定義
當您從 localhost 發送電子郵件時:
postfix/smtpd[8110]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 454 4.7.1 <persona@company.com>: Relay access denied; from=<testing-mailinglist-bounces@domain1.com> to=<persona@company.com> proto=ESMTP helo=<ip-10-92-34-5.ap-northeast-1.compute.internal>
您必須允許 postfix 轉發來自本地主機的電子郵件。編輯main.cf添加:
mynetworks = 127.0.0.0/8