我在租用的服务器上建立了一个网站。我拥有该服务器的完全访问权限,并且已设置好网站正常运行所需的一切,包括邮件服务器。我还想补充一点,我不是 Linux 专家,甚至算不上系统管理员。
当我的系统 (mail.dappwall.com) 发送电子邮件时,它没有到达 gmail 邮箱。我检查了 mail.log,它显示
stats=bounced(..一些文本)我们的系统检测到此 550-5.7.1 消息不符合有关 PTR 记录 550-5.7.1 和身份验证的 IPv6 发送指南。
在http://www.digwebinterface.com/我提供了域名的 IP 地址(46.4.88.247),然后单击 Dig。结果:
247.88.4.46.in-addr.arpa. 21600 IN PTR static.247.88.4.46.clients.your-server.de.
这样应该没问题吧?
然后我尝试了这个:
dig 247.88.4.46.in-addr.arpa
; <<>> DiG 9.8.1-P1 <<>> 247.88.4.46.in-addr.arpa
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7842
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;247.88.4.46.in-addr.arpa. IN A
;; AUTHORITY SECTION:
88.4.46.in-addr.arpa. 86106 IN SOA ns1.your-server.de. postmaster.your-server.de. 2013092900 86400 1800 3600000 86400
;; Query time: 2 msec
;; SERVER: 213.133.100.100#53(213.133.100.100)
;; WHEN: Mon Oct 7 21:03:48 2013
;; MSG SIZE rcvd: 107
我不知道这意味着什么,也不知道我现在能做什么。
在 postfix main.cf 中我填写了下面的行,因为当它默认为空时,并不是每封邮件都会到达 gmail 邮箱(状态=退回,mail.dappwall.com 的邮件循环回到我自己)。
mydestination = mail.dappwall.com, localhost.dappwall.com, localhost
但是现在我遇到了 Gmail 的 IPv4 错误。
我可以访问服务器的某些信息。我发现
1. Nameserver: ns1.something-ns.de
(我更改了“某些内容”)。还有两个名称服务器,我还可以添加一些。
我猜测 dig 命令的结果有些问题:
ns1.你的服务器.de。 postmaster.你的服务器.de。我没有改变任何东西,所以它应该是别的东西,而不是你的服务器,对吧?结果也是http://www.digwebinterface.com/我不喜欢这个'静态.876.54.3.21.客户端.你的服务器.de。'(我也没有改变这个)。
我正在使用 postfix 发送电子邮件。
编辑 将 88.4.46.in-addr.arpa 添加到以下反向 DNS 条目后:https://robot.your-server.de/server问题所暗示的仍然存在。
邮件日志不掩盖任何东西:
Oct 7 23:22:05 www postfix/pickup[22424]: 98C0F2C41544: uid=33 from=<www-data>
Oct 7 23:22:05 www postfix/cleanup[22434]: 98C0F2C41544: message-id=<20131007212205.98C0F2C41544@Ubuntu-1204-precise-64-minimal.localdomain>
Oct 7 23:22:05 www postfix/qmgr[22425]: 98C0F2C41544: from=<[email protected]>, size=3438, nrcpt=1 (queue active)
Oct 7 23:22:06 www postfix/smtp[22443]: 98C0F2C41544: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[2a00:1450:4001:c02::1b]:25, delay=0.58, delays=0.16/0.1/0.17/0.15, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[2a00:1450:4001:c02::1b] said: 550-5.7.1 [2a01:4f8:140:71ed::2 16] Our system has detected that this 550-5.7.1 message does not meet IPv6 sending guidelines regarding PTR records 550-5.7.1 and authentication. Please review 550-5.7.1 https://support.google.com/mail/?p=ipv6_authentication_error for more 550 5.7.1 information. 7si24941299eeo.229 - gsmtp (in reply to end of DATA command))
Oct 7 23:22:06 www postfix/cleanup[22434]: 2312F2C4155C: message-id=<20131007212206.2312F2C4155C@Ubuntu-1204-precise-64-minimal.localdomain>
Oct 7 23:22:06 www postfix/bounce[22445]: 98C0F2C41544: sender non-delivery notification: 2312F2C4155C
Oct 7 23:22:06 www postfix/qmgr[22425]: 2312F2C4155C: from=<>, size=6231, nrcpt=1 (queue active)
Oct 7 23:22:06 www postfix/qmgr[22425]: 98C0F2C41544: removed
Oct 7 23:22:06 www postfix/local[22438]: 2312F2C4155C: to=<[email protected]>, relay=local, delay=0.1, delays=0.05/0/0/0.05, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 7 23:22:06 www postfix/qmgr[22425]: 2312F2C4155C: removed
Oct 7 23:24:01 www postfix/pickup[22424]: C05F32C41544: uid=0 from=<root>
Oct 7 23:24:01 www postfix/cleanup[22455]: C05F32C41544: message-id=<20131007212401.C05F32C41544@Ubuntu-1204-precise-64-minimal.localdomain>
Oct 7 23:24:01 www postfix/qmgr[22425]: C05F32C41544: from=<[email protected]>, size=766, nrcpt=1 (queue active)
Oct 7 23:24:01 www postfix/local[22459]: C05F32C41544: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.2, delays=0.13/0.01/0/0.06, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 7 23:24:01 www postfix/qmgr[22425]: C05F32C41544: removed
编辑2:
Oct 8 21:42:12 www postfix/pickup[31192]: B32672C414E4: uid=33 from=<www-data>
Oct 8 21:42:12 www postfix/cleanup[31198]: B32672C414E4: message-id=<20131008194212.B32672C414E4@Ubuntu-1204-precise-64-minimal.localdomain>
Oct 8 21:42:12 www postfix/qmgr[22425]: B32672C414E4: from=<[email protected]>, size=3425, nrcpt=1 (queue active)
Oct 8 21:42:13 www postfix/smtp[31254]: B32672C414E4: to=<[email protected]>, relay=gmail-smtp-in.l.google.com[2a00:1450:4001:c02::1a]:25, delay=0.99, delays=0.15/0/0.22/0.62, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[2a00:1450:4001:c02::1a] said: 550-5.7.1 [2a01:4f8:140:71ed::2 16] Our system has detected that this 550-5.7.1 message does not meet IPv6 sending guidelines regarding PTR records 550-5.7.1 and authentication. Please review 550-5.7.1 https://support.google.com/mail/?p=ipv6_authentication_error for more 550 5.7.1 information. z8si29131291eee.203 - gsmtp (in reply to end of DATA command))
Oct 8 21:42:13 www postfix/cleanup[31198]: A937F2C4155F: message-id=<20131008194213.A937F2C4155F@Ubuntu-1204-precise-64-minimal.localdomain>
Oct 8 21:42:13 www postfix/bounce[31276]: B32672C414E4: sender non-delivery notification: A937F2C4155F
Oct 8 21:42:13 www postfix/qmgr[22425]: A937F2C4155F: from=<>, size=6218, nrcpt=1 (queue active)
Oct 8 21:42:13 www postfix/qmgr[22425]: B32672C414E4: removed
Oct 8 21:42:13 www postfix/local[31271]: A937F2C4155F: to=<[email protected]>, relay=local, delay=0.09, delays=0.06/0/0/0.03, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 8 21:42:13 www postfix/qmgr[22425]: A937F2C4155F: removed
Oct 8 21:44:01 www postfix/pickup[31192]: 668DD2C414E4: uid=0 from=<root>
Oct 8 21:44:01 www postfix/cleanup[31282]: 668DD2C414E4: message-id=<20131008194401.668DD2C414E4@Ubuntu-1204-precise-64-minimal.localdomain>
Oct 8 21:44:01 www postfix/qmgr[22425]: 668DD2C414E4: from=<[email protected]>, size=766, nrcpt=1 (queue active)
Oct 8 21:44:01 www postfix/local[31286]: 668DD2C414E4: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.21, delays=0.16/0.01/0/0.05, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 8 21:44:01 www postfix/qmgr[22425]: 668DD2C414E4: removed
Postfix 主配置文件:
myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name
biff = no
append_dot_mydomain = no
readme_directory = no
mydomain = mail.dappwall.com
mydestination = $mydomain localhost.$mydomain localhost $mydomain
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks_style = host
mailbox_size_limit = 0
virtual_mailbox_limit = 0
recipient_delimiter = +
inet_interfaces = all
message_size_limit = 0
# SMTP Authentication (SASL)
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
# Encrypted transfer (SSL/TLS)
smtp_use_tls = yes
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/ssl/private/mail.dappwall.com.crt
smtpd_tls_key_file = /etc/ssl/private/mail.dappwall.com.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# Basic SPAM prevention
smtpd_helo_required = yes
smtpd_delay_reject = yes
disable_vrfy_command = yes
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, permit
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
# Force incoming mail to go through Amavis
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
# Virtual user mappings
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_maps = mysql:/etc/postfix/maps/user.cf
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_alias_maps = mysql:/etc/postfix/maps/alias.cf
virtual_mailbox_domains = mysql:/etc/postfix/maps/domain.cf
机器人中的 DNS 条目部分:
@ IN NS robotns3.second-ns.com.
@ IN NS robotns2.second-ns.de.
@ IN NS ns1.first-ns.de.
@ IN A 46.4.88.247
localhost IN A 127.0.0.1
mail IN A 46.4.88.247
www IN A 46.4.88.247
ftp IN CNAME www
imap IN CNAME www
loopback IN CNAME localhost
pop IN CNAME www
relay IN CNAME www
smtp IN CNAME www
@ IN MX 10 mail
答案1
日志抱怨的是您的 IPv6 地址,而不是您的 IPv4 地址。如果我没记错的话,不管怎样,似乎目标邮件服务器 (gmail) 抱怨您的正向和反向 DNS 查找不匹配。
mail.mydomain.com 应该解析为一个 IP,并且该 IP 应该解析回 mail.mydomain.com(mail.mydomain.com 是您配置邮件服务器在发送邮件时用来识别自己的域)。
您可以让您的服务器托管商为您的 IP 设置反向 DNS 条目。或者,如果 clients.your-server.de 有效且未更改,您可以通过登录自行设置https://robot.your-server.de/server转到“服务器”,选择要编辑的服务器,然后在 IP 旁边输入反向 DNS 名称(用于 IPv4 和 IPv6)。
编辑:已添加示例
正向查找和反向查找如何结合在一起的示例(IPv4 和 IPv6):
# host us1.dopefish.de
us1.dopefish.de has address 192.249.58.230
us1.dopefish.de has IPv6 address 2604:180::ef4b:4638
# host 192.249.58.230
230.58.249.192.in-addr.arpa domain name pointer us1.dopefish.de.
# host 2604:180::ef4b:4638
8.3.6.4.b.4.f.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.1.0.4.0.6.2.ip6.arpa domain name pointer us1.dopefish.de.