![Postfix 將不會接收虛擬網域的電子郵件](https://rvso.com/image/668796/Postfix%20%E5%B0%87%E4%B8%8D%E6%9C%83%E6%8E%A5%E6%94%B6%E8%99%9B%E6%93%AC%E7%B6%B2%E5%9F%9F%E7%9A%84%E9%9B%BB%E5%AD%90%E9%83%B5%E4%BB%B6%20.png)
我已經找了3天的解決方案了,但似乎沒有用。 Postfix 可以很好地從伺服器發送電子郵件,但無法接收它們。每次我嘗試向其中一個虛擬網域寫入電子郵件時,都會收到「中繼存取被拒絕」的訊息
這是後綴配置:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relay_domains = $mydestination
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
郵件日誌:
Oct 14 08:42:44 ns519796 postfix/smtpd[19172]: connect from mail-yk0-f177.google.com[209.85.160.177]
Oct 14 08:42:44 ns519796 postfix/smtpd[19172]: NOQUEUE: reject: RCPT from mail-yk0-f177.google.com[209.85.160.177]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-yk0-f177.google.com>
Oct 14 08:42:44 ns519796 postfix/smtpd[19172]: disconnect from mail-yk0-f177.google.com[209.85.160.177]
答案1
mydestination 包含您的 example.com 嗎?
mydestination = example.com, $myhostname, localhost.$mydomain, localhost
中繼存取被拒絕不是每個郵箱的錯誤,它表示此處不接受您正在尋找的網域,並假設您要中繼到該網域(因為它不是本地域)
別名映射的問題可能與郵箱未找到錯誤有關,而不是與中繼錯誤有關。
電子郵件地址錯誤:
rcpt to:[email protected]
554 5.7.1 <[email protected]>: Recipient address rejected: Access denied
域錯誤:
rcpt to:[email protected]
454 4.7.1 <[email protected]>: Relay access denied