554 5.7.1 中继访问被拒绝

554 5.7.1 中继访问被拒绝

我一直在尝试修复我的 Postfix 服务器,但不知何故它仍然不想接受来自任何地方的电子邮件。从 gmail 我收到此错误:

完全无法传送给下列收件人:

支持@xxx

永久失败的技术细节:Google 尝试传递您的消息,但收件人 >domain xxx by mail.xxx. [ip.address.here] 的服务器拒绝了该消息。

另一台服务器返回的错误是:554 5.7.1:中继访问被拒绝

这是我的 postfix 配置:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
disable_vrfy_command = yes
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
myhostname = CHANGED HOSTNAME
mynetworks_style = host
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550

我已经尝试了几个小时来寻找解决方案,并且访问并尝试了几乎所有方法。

请帮帮我

答案1

@Jaan Postfix 仅当电子邮件地址属于以下任一地址类别时才会接受邮件。

  • 本地域类
  • 虚拟别名类
  • 虚拟邮箱类
  • 接力类

或者如果连接主机在 mynetworks(默认类)下列出。有关 postfix 地址类的更多信息这里

您的屏幕截图显示您正在将域 xxx 设置为本地域类。我从未使用任何 GUI 进行 Postfix 管理。确保 main.cf 中存在以下配置

mydestination = xxx
# to consider xxx domain as local address class
# add localhost localhost.$mydomain also to mydestination after your testing
# valid users under mydestination domains should be specified using local_recipient_maps

#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
# commented it out, because default setting is proxy:unix:passwd.byname $alias_maps
# Now all your UNIX users and special aliases in $alias_maps can receive mails

相关内容