为什么 Gmail 使用 RFC 2822 拒绝我们的电子邮件 non-compliant?

Why is Gmail rejected our emails as non-compliant with RFC 2822?

我们使用 Mailgun 发送电子邮件,最近我发现每天都有相当多的电子邮件被 Gmail 拒绝。

这是我们收到的消息类型:

550
5.7.1 [184.173.153.6      11] Our system has detected that this message is
5.7.1 not RFC 2822 compliant. To reduce the amount of spam sent to Gmail,  
5.7.1 this message has been blocked. Please review
5.7.1 RFC 2822 specifications for more information. f15si23385851vdu.1 - gsmtp

RFC 2822 规范是一个庞大的文档,所以我没有阅读它 front-to-back 但是通过查看网络上的资源,我们的电子邮件不会陷入任何常见的陷阱从 Gmail 触发此类响应。

这是一个示例电子邮件 header:

Received: by luna.mailgun.net with HTTP; Mon, 29 Jun 2015 21:06:59 +0000
Message-Id: <20150629210659.18668.39318@(domain)>
X-Mailgun-Variables: {"variation": "original", "campaign_code":
 "(customValue)"}
Reply-To: (name) <(email)>
X-Mailgun-Track: false
X-Mailgun-Tag: (customTag)
To: (email)
From: (name) <(email)>
Subject: (subject)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="12f0bd630f2145a3afcd98b621a3b1f2"

--12f0bd630f2145a3afcd98b621a3b1f2
Content-Type: text/plain; charset="ascii"
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit

(text content)

--12f0bd630f2145a3afcd98b621a3b1f2
Content-Type: text/html; charset="ascii"
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>(title)</title>
<style type="text/css">
(css)
</style>

</head><body style="(css)" >
  (content)
</body>
</html>
--12f0bd630f2145a3afcd98b621a3b1f2--

我们做错了什么?

您的示例中一个明显的 rfc2822 违规是缺少 Date header .

来自 rfc2822, Section 3.6:

The only required header fields are the origination date field and
the originator address field(s).

结果我们使用了两个不同的域作为 From 和 Reply-to,我想这是不行的。