Gmail邮件标记未能正常工作

14

我正在测试Gmail的物流邮件标记功能,但似乎无法正确使用。这是我发送给自己的电子邮件后的邮件内容:

Return-Path: <test.email@gmail.com>
Received: from my-pc.local ([my.ip.add.ress])
        by mx.google.com with ESMTPSA id 68sm3737559qgz.8.2015.01.29.06.06.37
        for <test.email@gmail.com>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 29 Jan 2015 06:06:38 -0800 (PST)
Date: Thu, 29 Jan 2015 11:06:33 -0300
From: "Test Name" <test.email@gmail.com>
To: test.email@gmail.com
Subject: Your package is on its way
Message-ID: <20150129140633.GA18059@my-pc.local>
MIME-Version: 1.0
Content-Type: text/html; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.23 (2014-03-12)

<html>
  <body>
    <script type="application/ld+json">
    {
      "@context": "http://schema.org",
      "@type": "ParcelDelivery",
      "deliveryAddress": {
        "@type": "PostalAddress",
        "streetAddress": "Test Address",
        "addressLocality": "Test locality",
        "addressRegion": "Test Region",
        "addressCountry": "CL",
        "postalCode": "7551234"
      },
      "expectedArrivalUntil": "2015-02-12T12:00:00-04:00",
      "carrier": {
        "@type": "Organization",
        "name": "Test org"
      },
      "itemShipped": {
        "@type": "Product",
        "name": "iPod Mini"
      },
      "partOfOrder": {
        "@type": "Order",
        "orderNumber": "176057",
        "merchant": {
          "@type": "Organization",
          "name": "Test Org 2"
        },
        "orderStatus": "OrderInTransit"
      },
      "trackingUrl": "http://track.com/track/1234567890",
      "trackingNumber": "1234567890"
    }
    </script>
    <p>Test paragraph</p>
  </body>
</html>

这段文字是关于编程的内容,描述了根据标记验证器,标记是有效的。虽然有一些推荐但不是必需的字段我没有添加,但添加它们也没有帮助。
我还尝试过使用微数据格式,但迄今为止没有成功:
<html>
  <body>
    <div itemscope itemtype="http://schema.org/ParcelDelivery">
      <div itemprop="deliveryAddress" itemscope itemtype="http://schema.org/PostalAddress">
        <meta itemprop="streetAddress" content="Test Address"/>
        <meta itemprop="addressLocality" content="San Francisco"/>
        <meta itemprop="addressRegion" content="CA"/>
        <meta itemprop="addressCountry" content="US"/>
        <meta itemprop="postalCode" content="94107"/>
      </div>
      <meta itemprop="expectedArrivalUntil" content="2015-01-12T12:00:00-08:00"/>
      <div itemprop="carrier" itemscope itemtype="http://schema.org/Organization">
        <meta itemprop="name" content="Test Carrier"/>
      </div>
      <div itemprop="itemShipped" itemscope itemtype="http://schema.org/Product">
        <meta itemprop="name" content="iPod Mini"/>
      </div>
      <div itemprop="partOfOrder" itemscope itemtype="http://schema.org/Order">
        <meta itemprop="orderNumber" content="176057"/>
        <div itemprop="merchant" itemscope itemtype="http://schema.org/Organization">
          <meta itemprop="name" content="Bob Dole"/>
        </div>
        <meta itemprop="orderStatus" content="OrderInTransit"/>
      </div>
      <meta itemprop="trackingUrl" content="http://track.com/track/1234567890"/>
      <meta itemprop="trackingNumber" content="1234567890"/>
    </div>
    <p>Test paragraph</p>
  </body>
</html>

我该注意什么?

我正在使用mutt发送电子邮件:

mutt -e "set content_type=text/html" test.email@gmail.com -s "Your package is on its way" < test.html

或者不带内容类型:

mutt test.email@gmail.com -s "Your package is on its way" < test.html

我有同样的问题,微数据通过验证器,但即使发送电子邮件给自己,它们也被丢弃了。昨天我在我的DNS中添加了SPF记录,尽管我认为这对自我测试并不需要(https://developers.google.com/gmail/markup/testing-your-schema)。 - Antoine Pinsard
我终于成功了。我不得不添加一个SPF记录,并将谷歌IP地址2a00:1450:4010:c07::264标记为允许发送者。我猜这是因为我使用了谷歌SMTP中继。 - Antoine Pinsard
@AntoinePinsard 谢谢,我一定会尝试的。 - jlhonora
实际上,IP并不总是相同的,有时只能工作。如果您使用Google SMTP中继,则DNS记录应如下所示:600 IN TXT“v = spf1 a include:_spf.google.com〜all” - Antoine Pinsard
2个回答

2
如果您使用 Google SMTP 中继,您需要使用类似于以下的SPF记录:
600 IN TXT "v=spf1 a include:_spf.google.com ~all"

来源:https://support.google.com/a/answer/178723?hl=en

这是有关Google Apps的IT技术相关内容。Google Apps是一款云计算软件,它包含了很多应用程序,如Gmail、Google Drive和Google Docs等。这些应用程序可以帮助用户更好地组织和管理工作。此外,Google Apps还提供了安全性和易用性方面的保障,因此它被广泛应用于企业和学校等场合。


你能详细说明一下吗?我也遇到了同样的问题,请。 - Idemax

1

我正在使用Gmail的SMTP服务器,以下是一个smtp日志示例:Jan 29 16:40:13 host=smtp.gmail.com tls=on auth=on user=test.email@gmail.com from=test.email@gmail.com recipients=test.email@gmail.com mailsize=1447 smtpstatus=250 smtpmsg='250 2.0.0 OK 1422560413 50sm7879005qgj.12 - gsmtp' exitcode=EX_OK。但是,我在原始电子邮件内容中找不到DKIM签名。 - jlhonora
我假设test.email@gmail.com不是你的真实地址!请尝试使用你的真实地址。 - Markus Lanthaler
我用 test.email@gmail.com 替换了所有出现的真实地址。 - jlhonora
1
自一月以来,这个 bug 有任何消息吗?因为我也遇到了完全相同的问题。 - g123k
2
现在已经过去了5年以上,我面临着完全相同的问题,却没有解决方案。SPF和DKIM都正常工作。标记检查也通过了。还尝试通过Google SMTP发送,但仍然没有任何进展。 - Brian Tristam Williams

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接