是否应在Subject:标题后插入DKIM签名?

时间:2017-05-26 04:18:58

标签: email dkim

我的ISP(Virgin Media)正在他们的电子邮件中引入DKIM。

发送邮件后,我查看了源代码,发现他们将DKIM签名放在Subject:标题和正文之间。

Return-Path: <xxxxxxxx@blueyonder.co.uk>
Delivered-To: xxxxxxxx@blueyonder.co.uk
Received: from md17.tb.ukmail.iss.local ([212.54.57.73])
    by mc8.tb.ukmail.iss.local (Dovecot) with LMTP id 5cl8E7ZoJlmNQwAAVqD7fw
    for <xxxxxxxx@blueyonder.co.uk>; Thu, 25 May 2017 07:17:29 +0200
Received: from mx6.tb.ukmail.iss.as9143.net ([212.54.57.73])
    by md17.tb.ukmail.iss.local (Dovecot) with LMTP id 
EstZLcTm/VjmbwAAeUlFJQ
    ; Thu, 25 May 2017 07:17:29 +0200
Received: from know-smtprelay-omc-3.server.virginmedia.net ([80.0.253.67])
    by mx6.tb.ukmail.iss.as9143.net with bizsmtp
    id QVHM1v00m1U0oNg01VHVUu; Thu, 25 May 2017 07:17:29 +0200
X-SourceIP: 80.0.253.67
X-CNFS-Analysis: v=2.2 cv=K/RSJ2eI c=1 sm=1 tr=0
 a=NusZbS+MIKNGTdhVDzOOtg==:117 a=o+HFlgnLNhdkn43EnkHUFQ==:17
 a=KXL61P45u2kA:10 a=tJ8p9aeEuA8A:10 a=MTPcje7z3XVcjakvMuAA:9
Received: from [192.168.0.19] ([80.193.xxxx.xxxx])
    by know-smtprelay-3-imp with bizsmtp
id QVHU1v0051httJ801VHU5a; Thu, 25 May 2017 06:17:29 +0100
X-Originating-IP: [80.193.182.78]
X-Authenticated-User: xxxxxxxxn@blueyonder.co.uk
X-Spam: 0
X-Authority: v=2.1 cv=XNzNMlVE c=1 sm=1 tr=0 a=o+HFlgnLNhdkn43EnkHUFQ==:117
 a=o+HFlgnLNhdkn43EnkHUFQ==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10
 a=s5jvgZ67dGcA:10 a=MTPcje7z3XVcjakvMuAA:9
From: xxxxxxxx@blueyonder.co.uk
To: xxxxxxxx@timothydutton.co.uk, xxxxxxxx@blueyonder.co.uk
Subject: Sending via Python
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blueyonder.co.uk;
    s=meg.feb2017; t=1495689449;
    bh=8bjk8lFzQ2833A/RBLNeoi8C+tOykYEwquKHC+57mNw=; h=From:To:Subject;
    b=ZuUwY74fd1AyxgXZ1LalJmb4fUFNqrQzOPall5FXrwTWoEYMBqR6u44HNJ1VOp1Jh
     +ik/ip8stBs7SXM/3ViaL/Vj4cP9CPdxO1UY/kblhojNF2Jw31f69gCpGdDQVCx6eC
     1KNdN0VadqQYVXd//wERGhXo+h2tkN2Ey0fZHxItXnN4ua90wwJfg3Iq2kM16m7OYw
     W+JiISTy84jqYxS7TFpgtfSLdZUG5y5OyG9r9rP9JBXxqBUIaq/QlAfcuTVJ9HXhLf
     h0d0CWLqSRoNrE2Dcqe/ES5cl12tL1HR3wHN4oU/kT0ilINEzRGSzkkeT0eHAUSjC6
     zfRok7vuo+GQA==

Yo this is a mail sent via Python 3.6

根据Virgin Media的说法,这是预期的行为。但我的理解是,SMTP服务器应该将标题添加到开头而不是消息的中间?

这是允许在SMTP或DKIM标准中,还是会导致问题?

1 个答案:

答案 0 :(得分:0)

是的,这是DKIM标准允许的。我所知道的唯一要求如下:

  

DKIM-Signature标题字段必须先插入任何其他字段   标题块中的DKIM-Signature字段。   RFC 6376 section 5.6

但建议将其添加到消息中:

  

DKIM-Signature标题字段应该被视为a   跟踪头字段,如[RFC5322]第3.6节中定义的那样   不应该重新排序,并且应该在消息之前加上。   RFC 6376 section 3.5