554 5.7.1 :中继访问被拒绝

554 5.7.1 :中继访问被拒绝

我查看了有关此类似问题的帖子并尝试了建议,但没有成功。

请帮我弄清楚为什么我的 postfix 服务器无法接收电子邮件。

我有指向 Postfix 服务器的 MX 记录

这是我的 main.cf

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = cumail.circircuitsunited.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost.$mydomain, localhost, $mydomain
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 localhost
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtp_tls_security_level = may
allow_percent_hack = no

答案1

您的myhostname打字看起来像是错字,我认为circircuitsunited.com应该是circuitsunited.com

$ nslookup -type=mx circuitsunited.com
Non-authoritative answer:
circuitsunited.com      mail exchanger = 50 ec2-52-52-52-169.us-west-1.compute.amazonaws.com.
$ telnet ec2-52-52-52-169.us-west-1.compute.amazonaws.com 25
Trying 52.52.52.169...
Connected to ec2-52-52-52-169.us-west-1.compute.amazonaws.com.
Escape character is '^]'.
220-cumail.circircuitsunited.com ESMTP Postfix (Ubuntu)

这确认这是您的服务器。您的指令中有拼写错误myhostname。变量$mydomain 默认为 $myhostname 减去第一个部分,因此您的服务器目前仅接受 的邮件circircuitsunited.com

附注:您应该设置与此机器相同的 DNS 记录(正向和反向)。无效的主机名通常用于垃圾邮件检测。不匹配的主机名会增加垃圾邮件的可能性。

相关内容