多年来我一直在研究这个问题,但没有成功(不久前我放弃了,只是希望 Gmail 最终能够“了解到”来自我的某个服务器的消息不是垃圾邮件,但这显然从未发生过)。
我是一名游戏开发者,负责为客户运营论坛和下载服务器。作为运营的一部分,我需要向客户发送电子邮件,通常是应他们的要求。例如,从我的论坛发送密码重置电子邮件。这不是“批量”邮件的情况,我的服务器也不会发送大量电子邮件。
我有两台服务器,均由同一个托管服务提供商提供。
一个是在共享主机环境中,我在其中获得一个子目录,并使用虚拟主机重新解析我的域名。来自该服务器的电子邮件始终可以正常接收(尽管我没有设置电子邮件系统,也没有太多控制权)。
另一个是我管理的 VPS。我在那里有自己的 IP 地址,可以完全控制一切。从 VPS,我从来没有能够发送 Gmail 不会认为是垃圾邮件的电子邮件。我已经设置了 spf、dkim,所有测试似乎都通过了,甚至根据 Gmail 在我“查看原始邮件”时的说法也是如此。我没有被列入任何我能看到的黑名单。而且我已经用甚至不包含任何链接或图像的“个人”邮件测试过它。仍然是垃圾邮件。
但是,我刚刚进行了受控测试(从这些服务器上的 Webmail 发送了相同的消息),非垃圾邮件服务器上的标头有很大不同。看起来邮件是通过邮件中继发送的。也许这在某种程度上有所帮助(如果邮件中继是可信的,我想?)以下是 Gmail 视为非垃圾邮件的原始消息:
Delivered-To: [email protected]
Received: by 10.182.233.195 with SMTP id ty3csp518065obc;
Tue, 14 Feb 2017 22:46:33 -0800 (PST)
X-Received: by 10.99.171.5 with SMTP id p5mr36545947pgf.182.1487141193736;
Tue, 14 Feb 2017 22:46:33 -0800 (PST)
Return-Path: <[email protected]>
Received: from cross.birch.relay.mailchannels.net (cross.birch.relay.mailchannels.net. [23.83.209.46])
by mx.google.com with ESMTPS id m10si2359238pln.229.2017.02.14.22.46.33
for <[email protected]>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Tue, 14 Feb 2017 22:46:33 -0800 (PST)
Received-SPF: pass (google.com: domain of [email protected] designates 23.83.209.46 as permitted sender) client-ip=23.83.209.46;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of [email protected] designates 23.83.209.46 as permitted sender) [email protected]
X-Sender-Id: asmallorange|x-authuser|[email protected]
Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id F1F6E1412C0 for <[email protected]>; Wed, 15 Feb 2017 06:46:32 +0000 (UTC)
Received: from rory.asoshared.com (unknown [100.96.13.116]) by relay.mailchannels.net (Postfix) with ESMTPA id 7722A1413D6 for <[email protected]>; Wed, 15 Feb 2017 06:46:32 +0000 (UTC)
X-Sender-Id: asmallorange|x-authuser|[email protected]
Received: from rory.asoshared.com (rory.asoshared.com [172.20.104.49]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.7.19); Wed, 15 Feb 2017 06:46:32 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: asmallorange|x-authuser|[email protected]
X-MailChannels-Auth-Id: asmallorange
X-MC-Loop-Signature: 1487141192688:2323082264
X-MC-Ingress-Time: 1487141192688
Received: from [::1] (port=55001 helo=northcountrynotes.org) by rory.asoshared.com with esmtpa (Exim 4.87) (envelope-from <[email protected]>) id 1cdtME-00089O-RN for [email protected]; Wed, 15 Feb 2017 01:46:31 -0500
Received: from 50.1.19.178 ([50.1.19.178])
(SquirrelMail authenticated user [email protected])
by northcountrynotes.org with HTTP;
Wed, 15 Feb 2017 01:46:30 -0500
Message-ID: <[email protected]>
Date: Wed, 15 Feb 2017 01:46:30 -0500
Subject: Hello from an old friend
From: [email protected]
To: [email protected]
User-Agent: SquirrelMail/1.5.2 [SVN]
MIME-Version: 1.0
Content-Type: text/plain;charset=utf-8
Content-Transfer-Encoding: 8bit
X-AuthUser: [email protected]
Hey Jason, my old friend. Remember when we went to school together so
long ago at Cornell. Boy! Those were the days. Hit me back if you want
to chat.
Justin J.
以下是来自 VPS 服务器的原始邮件,Gmail 始终将该邮件放入垃圾邮件文件夹:
Delivered-To: [email protected]
Received: by 10.182.233.195 with SMTP id ty3csp516102obc;
Tue, 14 Feb 2017 22:33:25 -0800 (PST)
X-Received: by 10.36.198.133 with SMTP id j127mr7649805itg.72.1487140405772;
Tue, 14 Feb 2017 22:33:25 -0800 (PST)
Return-Path: <[email protected]>
Received: from server.thecastledoctrine.net (server.thecastledoctrine.net. [108.165.22.58])
by mx.google.com with ESMTPS id 127si5199936itx.63.2017.02.14.22.33.25
for <[email protected]>
(version=TLS1 cipher=AES128-SHA bits=128/128);
Tue, 14 Feb 2017 22:33:25 -0800 (PST)
Received-SPF: pass (google.com: domain of [email protected] designates 108.165.22.58 as permitted sender) client-ip=108.165.22.58;
Authentication-Results: mx.google.com;
dkim=pass [email protected];
spf=pass (google.com: domain of [email protected] designates 108.165.22.58 as permitted sender) [email protected]
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thecastledoctrine.net; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:To:From:Subject:Date:Message-ID; bh=7hycuruqtuxJJjoFV/Gyd/n8jFs9UDvFVpJOWI96Abw=; b=yPnvk3ZVtOiXNFo9+zRP0mEdKWoahLgA4Au/GeUrmKC6uJiB9A6VJyEudRHdhidBiOalf30exm6gk+7+To0y1XEMwGzHpch8I32RY85qrJmzptX8mrqBBRC9Q51hfWCTcgmSXwS1YsiIgJYu96GSw+PZ2lgPAfOkZaR+i6lrIKs=;
Received: from localhost ([127.0.0.1]:54405 helo=thecastledoctrine.net) by server.thecastledoctrine.net with esmtpa (Exim 4.85) (envelope-from <[email protected]>) id 1cdt9X-0001bg-M5 for [email protected]; Wed, 15 Feb 2017 06:33:23 +0000
Received: from 50.1.19.178 ([50.1.19.178])
(SquirrelMail authenticated user [email protected])
by thecastledoctrine.net with HTTP;
Wed, 15 Feb 2017 06:33:23 -0000
Message-ID: <[email protected]>
Date: Wed, 15 Feb 2017 06:33:23 -0000
Subject: Hello from an old friend
From: [email protected]
To: [email protected]
User-Agent: SquirrelMail/1.5.2 [SVN]
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - server.thecastledoctrine.net
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - thecastledoctrine.net
X-Get-Message-Sender-Via: server.thecastledoctrine.net: authenticated_id: [email protected]
Hey Jason, my old friend. Remember when we went to school together so
long ago at Cornell. Boy! Those were the days. Hit me back if you want
to chat.
Justin J.
我猜我这里遗漏了一些简单的东西。
更新:
这是另一条从 VPS 发送的被标记为垃圾邮件的消息。这是由我的一个 PHP 脚本(下载服务器,向某人发送他们付费的下载密钥)生成的消息。它包含链接,但是当从共享服务器发送相同的消息时,它不是垃圾邮件。
Delivered-To: [email protected]
Received: by 10.182.233.195 with SMTP id ty3csp529399obc;
Tue, 14 Feb 2017 23:55:38 -0800 (PST)
X-Received: by 10.36.161.70 with SMTP id n6mr7354632iti.76.1487145338304;
Tue, 14 Feb 2017 23:55:38 -0800 (PST)
Return-Path: <[email protected]>
Received: from server.thecastledoctrine.net (server.thecastledoctrine.net. [108.165.22.58])
by mx.google.com with ESMTPS id w204si3392935itc.67.2017.02.14.23.55.37
for <[email protected]>
(version=TLS1 cipher=AES128-SHA bits=128/128);
Tue, 14 Feb 2017 23:55:38 -0800 (PST)
Received-SPF: pass (google.com: domain of [email protected] designates 108.165.22.58 as permitted sender) client-ip=108.165.22.58;
Authentication-Results: mx.google.com;
dkim=pass [email protected];
spf=pass (google.com: domain of [email protected] designates 108.165.22.58 as permitted sender) [email protected]
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thecastledoctrine.net; s=default; h=Message-Id:Date:Subject:To:From; bh=GFDUYdq+5oW7xSkEaXekddRXEY2zhMAKlOU/+v0g27c=; b=s3kENICTVFbW8saQ0ya7bh1V+XIb9a4NCQlUghvQHa/52Rw40V3e6a33jRgJCJx2v9kc4NhLDjUM6Q/upbLh6kRGWwTCotG7bIrLlhlKGnLgNaraffq2kVuNkTYi+auts7QzofJBs3Gw1ctvYJf7LH3fxVgiEqUK06P2Q0Dnim4=;
Received: from [108.165.22.59] (port=39156 helo=localhost) by server.thecastledoctrine.net with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85) (envelope-from <[email protected]>) id 1cduR6-0000KN-OG for [email protected]; Wed, 15 Feb 2017 07:55:36 +0000
From: Jason Rohrer <[email protected]>
To: [email protected]
Subject: Your [The Castle Doctrine] download is ready
Date: Wed, 15 Feb 2017 02:55:35 -0500
Message-Id: <[email protected]>
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - server.thecastledoctrine.net
X-AntiAbuse: Original Domain - gmail.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - thecastledoctrine.net
X-Get-Message-Sender-Via: server.thecastledoctrine.net: authenticated_id: [email protected]
Jason Rohrer Gmail:
Keep your ticket ID secure, because it is your sole way of accessing your account on the game server.
Your can now access your download at:
http://thecastledoctrine.net/ts/server.php?action=show_downloads&ticket_id=8G5QX
You can also access your download manually by entering your ticket 8G5QX here:
http://thecastledoctrine.net
不,这不是同一个问题。这里我有两个非批量电子邮件示例,一个已发送,另一个未发送。通常的答案毫无用处,因为我已经做了所有这些事情。
答案1
以下是我解决这个问题的方法:
我已将自己列入白名单。
我购买了一个每月收费 10 美元的 SendGrid 账户,这样我每月可以发送最多 40,000 封电子邮件,而且没有每日限制。
当我切换到他们的 smtp 服务器而不是我自己的时,所有相同的电子邮件都开始进入 GMail 收件箱而不是垃圾邮件文件夹。
我的共享主机提供商使用的 mailchannels.com 是一项与 SendGrid 类似的服务,但适用于拥有多个不受信任用户的大型组织(例如希望为其客户提供可靠的电子邮件发送功能的网络托管公司)。
无论如何,现在看来,仅仅不在黑名单上,并拥有所有正确的电子邮件/DNS验证(SPF等)是不够的。
Gmail 和其他电子邮件服务显然比其他任何服务都更依赖白名单。我猜想 SendGrid、MailGun、PostMark 等与 Google 签订了特殊协议,甚至可能是付费合同,以帮助它们发送所有电子邮件。这些服务还严格监控来自其自身客户的任何垃圾邮件——它们的声誉取决于此。
尽管 SPF 和 DKIM 已被多次讨论,试图帮助小型域名所有者,但我从未在任何地方看到过这样的回答。毕竟,这是一个老问题(我尝试了所有方法,但我的域名中的电子邮件仍然没有进入收件箱)。
SPF 和 DKIM 无法阻止垃圾邮件,因此它们几乎毫无用处。根据我的经验,Gmail 甚至不再关心它们。好吧,除了证明他们关心什么:
重要的是您的电子邮件来自哪里,以及该来源是否在信任圈内(并且需要 SPF)。
如果你像我一样,自己组装 VPS 并拥有自己的域名,那么你就不在信任范围之内了。为什么你不在信任范围之外呢?任何人都可以在廉价 VPS 上设置域名,并为该域名配置 SPF 和 DKIM。即使是垃圾邮件发送者!我的意思是,如果我想的话,我今晚就可以启动并运行一个垃圾邮件 VPS。
进入这个圈子的唯一方法(假设你不是那么出名,每个人自然就会信任你)是与已经在这个圈子里的人签约。
就像付钱给证书颁发机构以将你带入信任的加密圈一样。
否则,你就只是在为自己担保。
随着垃圾邮件问题不断增长,使用 SPF 和 DKIM 为自己担保已经不够了。
不幸的是,这却为这些电子邮件中继服务带来了丰厚的利润。
我试图抵制这种结论,回想起在扫帚间里运行的夫妻邮件服务器的辉煌岁月......但似乎那些日子已经结束了,我不得不放弃电子邮件独立的梦想。