我一直在寻找解决scheme已经3天了,但似乎没有用。 Postfix可以从服务器上发送电子邮件,但是无法收到。 每次我尝试写电子邮件到其中一个虚拟域时,我会得到“中继访问被拒绝”
这里是后缀configuration:
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
maillog中:
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]
mydestination是否包含你的example.com?
mydestination = example.com, $myhostname, localhost.$mydomain, localhost
拒绝中继访问不是每个邮箱的错误,它说你正在寻找的域名在这里不被接受,并假设你想中继到该域名(因为它不是本地域名)
别名地图的问题可能与邮箱没有find错误,而不是中继错误。
电子邮件地址错误:
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