Postfix sasl:中继访问被拒绝(状态 14)

Postfix sasl:中继访问被拒绝(状态 14)

我在 dovecot 上安装了 postfix。当我尝试从我的服务器发送电子邮件时没有任何问题,但是所有收到的电子邮件都被拒绝了。

我的 main.cf 文件:

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix

mail_owner = postfix
inet_interfaces = all

mydestination = localhost, $mydomain, /etc/postfix/domains/domains
virtual_maps = hash:/etc/postfix/domains/addresses


unknown_local_recipient_reject_code = 550
mynetworks = 127.0.0.0/8

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
home_mailbox = Maildir/

debug_peer_level = 2
debugger_command =
     PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
     xxgdb $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.3.3/samples
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:9999,
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_non_fqdn_recipient,
    reject_unknown_recipient_domain,
    reject_unauth_destination,
smtpd_sender_restriction = reject_non_fqdn_sender
broken_sasl_auth_clients = yes

更新:现在,当电子邮件到达服务器时,服务器会尝试重新路由邮件。例如,如果邮件被发送到[电子邮件保护],我的服务器将其更改为[电子邮件保护]然后邮件被退回,因为我的服务器上没有这个域。

答案1

从发布的配置中,我看不到 $myhostname 或 $mydomain - 如果 main.cf 中是这种情况,它只会将 @localhost 视为本地,其他所有内容都将被 550 拒绝。您可以发送出去,因为您已经通过 sasl 身份验证。

添加 $mydomain = yourdomainname.com 就可以了。

相关内容