![Postfix は仮想ドメインのメールを受信しません](https://rvso.com/image/668796/Postfix%20%E3%81%AF%E4%BB%AE%E6%83%B3%E3%83%89%E3%83%A1%E3%82%A4%E3%83%B3%E3%81%AE%E3%83%A1%E3%83%BC%E3%83%AB%E3%82%92%E5%8F%97%E4%BF%A1%E3%81%97%E3%81%BE%E3%81%9B%E3%82%93%20.png)
解決策を探して3日経ちましたが、どうやら役に立たないようです。Postfixはサーバーから問題なくメールを送信できますが、受信できません。仮想ドメインの1つにメールを書こうとすると、毎回「リレーアクセスが拒否されました」というメッセージが表示されます。
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