“NOQUEUE:拒绝:来自 thridparty.mailserver 的 RCPT:554 5.7.1 中继访问被拒绝”

“NOQUEUE:拒绝:来自 thridparty.mailserver 的 RCPT:554 5.7.1 中继访问被拒绝”

我最近升级了我的生产服务器(从 Ubuntu 15 到 Ubuntu 16.04.1)。

在升级之前,我遵循本教程用于配置 Dovecot/Postfix 和 Vimbadmin。

现在,我可以成功发送电子邮件,但无法接收任何电子邮件。我从 mail.log 收到此错误消息:

mail postfix/smtpd[10751]: NOQUEUE: reject: RCPT from col004-omc2s1.hotmail.com[xxxx]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<COL004-OMC2S1.hotmail.com>

9 月 17 日 21:00:38

这是我的 postfix 配置:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 2
mydestination = localhost
myhostname = mail.domain.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
non_smtpd_milters = inet:localhost:12301
policy-spf_time_limit = 3600s
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_CAfile = /etc/letsencrypt/live/mail.domain.com/chain.pem
smtp_tls_loglevel = 1
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_error_sleep_time = 2s
smtpd_hard_error_limit = 20
smtpd_helo_required = yes
smtpd_milters = inet:localhost:12301
smtpd_recipient_restrictions = reject_non_fqdn_recipient reject_unknown_recipient_domain permit_mynetworks permit_sasl_authenticated reject_unauth_destination smtpd_relay_restriction check_policy_service unix:private/policy-spf check_policy_service inet:127.0.0.1:10023
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_soft_error_limit = 10
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.domain.com/cert.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mail.domain.com/privkey.pem
smtpd_tls_protocols = !SSLv2, !SSLv3
smtpd_tls_received_header = yes
smtpd_tls_security_level = encrypt
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_wrappermode = no
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql/virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_domains = mysql:/etc/postfix/mysql/virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_uid_maps = static:5000

答案1

您需要设置mydestination = localhost以包含您的域名。

http://www.postfix.org/BASIC_CONFIGURATION_README.html

mydestination 参数指定此机器将在本地传送哪些域,而不是转发到另一台机器。默认为机器本身接收邮件。请参阅 VIRTUAL_README 文件以了解如何为托管域配置 Postfix。

您可以指定零个或多个域名、“/file/name”模式和/或“type:table”查找表(例如 hash:、btree:、nis:、ldap: 或 mysql:),以空格和/或逗号分隔。“/file/name”模式由其内容替换;“type:table”请求完成表查找并仅测试是否存在:查找结果将被忽略。

重要提示:如果您的机器是整个域的邮件服务器,那么您也必须列出 $mydomain。

例1:默认设置。

/etc/postfix/main.cf:mydestination = $myhostname localhost.$mydomain localhost

至于您的第二个问题,您必须澄清您的意思并提供更多信息......最好发布第二个问题。

相关内容