为什么我的服务器发送的电子邮件被标记为垃圾邮件?

Why are emails sent by my server marked as SPAM?

我的网站全部用 PHP 编写,有一个自动系统通过电子邮件通知用户。在我将所有东西移到一个新的更便宜的专用服务器(也是新 IP)之前,一切都运行良好。现在,所有电子邮件都从新服务器发送到垃圾邮件文件夹。为什么?发生了什么? Gmail 说它被标记为垃圾邮件,因为它违反了这些guidelines 关于发件人的。这是其中一封电子邮件

的消息 header
Delivered-To: fontanavideostudios@gmail.com
Received: by 10.64.224.200 with SMTP id re8csp1701580iec;
        Sun, 1 Feb 2015 07:30:19 -0800 (PST)
X-Received: by 10.140.22.5 with SMTP id 5mr1380826qgm.72.1422804619177;
        Sun, 01 Feb 2015 07:30:19 -0800 (PST)
Return-Path: <noreply@racebooking.net>
Received: from ns362512.ip-91-121-174.eu ([2001:41d0:1:ef28::1])
        by mx.google.com with ESMTP id e3si21772874qaf.113.2015.02.01.07.30.18
        for <fontanavideostudios@gmail.com>;
        Sun, 01 Feb 2015 07:30:19 -0800 (PST)
Received-SPF: none (google.com: noreply@racebooking.net does not designate permitted sender hosts) client-ip=2001:41d0:1:ef28::1;
Authentication-Results: mx.google.com;
       spf=none (google.com: noreply@racebooking.net does not designate permitted sender hosts) smtp.mail=noreply@racebooking.net
Received: by ns362512.ip-91-121-174.eu (Postfix, from userid 504)
    id DFE0916074; Sun,  1 Feb 2015 16:28:52 +0100 (CET)
To: fontanavideostudios@gmail.com
Subject: Qualcuno ha commentato il tuo post
X-PHP-Originating-Script: 504:new_notification.php
From: Racebooking <noreply@racebooking.net>
Reply-To: no-reply
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Message-Id: <20150201152852.DFE0916074@ns362512.ip-91-121-174.eu>
Date: Sun,  1 Feb 2015 16:28:52 +0100 (CET)

域 racebooking.net 具有良好的声誉,MX、mail、smtp 指向同一个 ip:91.121.174.40,与 racebooking.net 的 IP 相同(here is a test )

有什么想法吗?

检查 header 中的这一行:

Received-SPF: none (google.com: noreply@racebooking.net does not designate permitted sender hosts) client-ip=2001:41d0:1:ef28::1;
Authentication-Results: mx.google.com;
       spf=none (google.com: noreply@racebooking.net does not designate permitted sender hosts) smtp.mail=noreply@racebooking.net

我认为您没有正确配置 DNS 中的 SPF 条目。

查看此 Google 关于此的产品主题:https://productforums.google.com/forum/#!topic/apps/nvGcYDjONfc

我可以看到您没有为 "racebooking.net":

定义的 SPF 条目
$ dig +short racebooking.net txt
"1|www.racebooking.net"

您需要定义一个 SPF 条目,例如:

"v=spf1 mx a:mail0.racebooking.net -all"

您还需要包括您可能发送电子邮件的任何其他主机(即从@racebooking.net 发送电子邮件的 Web 应用程序)。

有关什么是 SPF 的更多信息:http://en.wikipedia.org/wiki/Sender_Policy_Framework