我正在尝试使用PHPMailer类在DKIM卡上签名电子邮件,但是我不能让它工作。
当我在gmail上看到电子邮件的标题时,我发现这个类成功地在电子邮件标题中注入了DKIM,但gmail甚至不在乎。
问题是,我已经查看了linkedIn电子邮件的标题,我发现它们使用了两个DKIM头,DomainKey-Signature和DKIM-Signature。
有什么关系呢?这就是Gmail不验证我的邮件的原因吗?&你有没有推荐一些替代的、健壮的类来在php上用域名签署邮件?
谢谢
发布于 2010-11-30 22:03:39
两者都使用公钥/私钥对电子邮件进行数字签名。两者都使用发送方DNS服务器中的文本文件,其中包含接收方可以用来验证签名的公钥。
Domain Keys是第一个版本。
DKIM是更新后的版本。
不同之处在于域密钥和DKIM如何对消息进行签名,以及如何构建报头。
电子邮件收件人可以实现它们中的任何一个(或同时实现两者)。如果你想覆盖所有的基础,你唯一能做的就是在两个类上都签名。
你想知道DomainKeys和DKIM之间区别的技术细节吗?
--戴夫
发布于 2011-03-19 09:02:41
PHPMailer 5.1中的DKIM支持开箱即用不能正常工作。为了让它正常工作,我必须这样做:
如果启用了($ http://sourceforge.net/tracker/index.php?func=detail&aid=2960165&group_id=26031&atid=385707
...to此命令:
// digitally sign with DKIM if enabled
if ($this->DKIM_domain && $this->DKIM_private) {
// Hack to add To: header to the headers which are passed to DKIM_Add
// Note that this only adds the first To: recipient, so it's going to break
// if you try to send an email to more than one person simultaneously
$header_temp = $header . $this->LE . 'To: ' . $this->to[0][0];
$header_dkim = $this->DKIM_Add($header_temp,$this->EncodeHeader($this->SecureHeader($this->Subject)),$body);
$header = str_replace("\r\n","\n",$header_dkim) . $header;
}https://stackoverflow.com/questions/4313481
复制相似问题