我在一个雇佣的服务器上build立了一个网站。 我可以完全访问这台服务器,并且已经设置了网站工作所需的一切,包括邮件服务器。 我也想补充一点,我不是一个Linux的家伙,甚至不接近系统pipe理员。
当我的系统(mail.dappwall.com)发送一封电子邮件时,它不会到达Gmail邮箱。 我检查mail.log,它说
stats = bounced(..some text)我们的系统检测到这个550-5.7.1消息不符合关于PTRlogging550-5.7.1和authentication的IPv6发送指导原则。
在http://www.digwebinterface.com/我提供了域的IP地址(46.4.88.247),并点击挖掘。 结果:
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邮箱(status = bounced,mail.dappwall.com的邮件循环回自己)。
mydestination = mail.dappwall.com, localhost.dappwall.com, localhost
但是现在我有这个gmail的IPv4错误。
我有权访问服务器的某些信息。 我发现了
1. Nameserver: ns1.something-ns.de
(我改变了“某事”)。 还有两个名称服务器,我也可以添加一些。
我猜这个挖命令的结果是错误的:
ns1.your-server.de。 postmaster.your-server.de。 我没有改变这个,所以它应该是别的东西,而不是你的服务器 ,对不对? 而且在http://www.digwebinterface.com/的结果我不喜欢这个' static.876.54.3.21.clients.your-server.de。 “(我也没有改变这个)。
我使用postfix发送电子邮件。
编辑在https://robot.your-server.de/server反向DNS入口添加88.4.46.in-addr.arpa后,问题仍然存在。
Mail.log没有掩盖任何东西:
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
后缀main.cf :
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
日志抱怨你的IPv6地址,而不是你的IPv4。 无论如何,似乎目标邮件服务器(gmail)抱怨说,如果我没有弄错,你的正向和反向DNS查找不匹配。
mail.mydomain.com应parsing为IP,并且该IP应parsing回mail.mydomain.com(mail.mydomain.com是您configuration邮件服务器以在发送邮件时用于标识自己的任何域)。
您可以让您的服务器主机为您的IP设置反向DNS条目。 或者,如果clients.your-server.de是有效的,并没有改变,你可以通过login到https://robot.your-server.de/server去“服务器”,select你想要的服务器编辑并在IP旁边input反向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.fe0.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.