Postfix / Dovecot中继访问被拒绝

我有一个邮件服务器(Postfix / Dovecot),其configuration如下:电子邮件转到每个虚拟用户的本地邮箱,并转发到Google Apps地址(例如[email protected] .COM)。

这一切正常工作,邮件传递到服务器邮箱和谷歌。

但是,日志中出现了一个奇怪的问题。 服务器路由邮件后,它会接收来自Google Apps服务器的连接,并引用他们刚收到的电子邮件 – 拒绝接受“拒绝中继访问”。 我不确定为什么会发生这种情况,Google正在发送什么样的响应。

这不是一个大问题,但是我对它是什么感兴趣……我有一个怀疑,这是我忽视的东西,但我的searchfu是逃避我!

示例(消毒)邮件日志:

Mar 20 13:51:03 services postfix/pipe[15363]: 076BF13A005: to=<[email protected]>, relay=dovecot, delay=0.93, delays=0.45/0.01/0/0.47, dsn=2.0.0, status=sent (delivered via dovecot service) Mar 20 13:51:04 services postfix/smtp[15364]: 076BF13A005: to=<[email protected]>, orig_to=<[email protected]>, relay=gmail-smtp-in.l.google.com[173.194.78.27]:25, delay=1.1, delays=0.45/0.01/0.09/0.57, dsn=2.0.0, status=sent (250 2.0.0 OK 1363787301 fu5si2128331wib.94 - gsmtp) Mar 20 13:51:04 services postfix/qmgr[20596]: 076BF13A005: removed Mar 20 13:51:05 services postfix/smtpd[15356]: connect from mail-la0-f69.google.com[209.85.215.69] Mar 20 13:51:05 services postfix/smtpd[15356]: NOQUEUE: reject: RCPT from mail-la0-f69.google.com[209.85.215.69]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-la0-f69.google.com> Mar 20 13:51:05 services postfix/smtpd[15356]: disconnect from mail-la0-f69.google.com[209.85.215.69] 

和postconf -n输出:

 alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases,hash:/var/lib/mailman/data/aliases append_dot_mydomain = no biff = no config_directory = /etc/postfix disable_vrfy_command = yes dovecot_destination_recipient_limit = 1 inet_interfaces = all mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 mailman_destination_recipient_limit = 1 mydestination = (localservername), localhost.(localservername), www.$mydomain, localhost mydomain = domain.org myhostname = (localservername) mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 localhost myorigin = /etc/mailname owner_request_special = no readme_directory = no recipient_delimiter = + relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_delay_reject = yes smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_type = dovecot smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem smtpd_tls_key_file = /etc/ssl/private/postfix.pem smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,hash:/var/lib/mailman/data/virtual-mailman virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_transport = dovecot 

“从…连接”表示客户端连接到您的服务器。 请参阅此链接以configuration客户端限制。 从本质上讲,你已经向这个行为要求postfix

 smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination 

mail-la0-f69.google.com [209.85.215.69]不在:

 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 localhost 

也不会被sasl authenticated ,导致它回reject_unauth_destination最后的选项reject_unauth_destination

看来,谷歌正试图使用​​您的电子邮件服务器尝试发送消息。 你如何转发邮件到谷歌? 这可能是问题的一部分。

日志似乎表明Google正在将发送的消息转发给您。 此消息被拒绝是因为作为从外部networking到外部域的未经validation的消息,它不通过smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination

您应该查看您的Google Apps设置和domain.org.test-google-a.com的MXlogging。