2017-04-12 178 views
0

我一直在试图用DKIM设置我的hmailserver。DKIM hmailserver和NameCheap设置

我按照本指南 - >https://www.hmailserver.com/forum/viewtopic.php?t=29402

我开了我的钥匙与这个网站 - >https://www.port25.com/dkim-wizard/

域名:linnabary.us

域关键字选择:DKIM

关键大小:1024

我创建了一个pem文件;

-----BEGIN RSA PRIVATE KEY----- 
<key> 
-----END RSA PRIVATE KEY----- 

救了它并加载它变成hmailserver

当我设置了上NameCheap我选择TXT记录,设置我的主机@,并把在这行,当然要去掉的关键;

v=DKIM1; k=rsa; p=<KEY> 

现在,当我与测试 - >http://www.isnotspam.com

它说我DKIM主要内容如下;

---------------------------------------------------------- 
DKIM check details: 
---------------------------------------------------------- 

Result: invalid 
ID(s) verified: [email protected] 
Selector= 
domain= 
DomainKeys DNS Record=._domainkey. 

我想知道我是否在记录中发现任何明显的错误。

编辑;

该电子邮件包含以下行;

dkim-signature: v=1; a=rsa-sha256; d=linnabary.us; s=dkim; 

这就是NameCheap上设置的样子;

enter image description here

这里是从下一个测试电子邮件;

This message is an automatic response from isNOTspam's authentication verifier service. The service allows email senders to perform a simple check of various sender authentication mechanisms. It is provided free of charge, in the hope that it is useful to the email community. While it is not officially supported, we welcome any feedback you may have at . 

Thank you for using isNOTspam. 

The isNOTspam team 

========================================================== 
Summary of Results 
========================================================== 

SPF Check : pass 
Sender-ID Check : pass 
DKIM Check : invalid 
SpamAssassin Check : ham (non-spam) 
========================================================== 
Details: 
========================================================== 

HELO hostname: [69.61.241.46] 
Source IP: 69.61.241.46 
mail-from: [email protected] 
Anonymous To: [email protected] 
--------------------------------------------------------- 
SPF check details: 
---------------------------------------------------------- 

Result: pass 
ID(s) verified: [email protected] 
DNS record(s): 
linnabary.us. 1799 IN TXT "v=spf1 a mx ip4:69.61.241.46 ~all" 


---------------------------------------------------------- 
Sender-ID check details: 
---------------------------------------------------------- 

Result: pass 

ID(s) verified: [email protected] 
DNS record(s): 
linnabary.us. 1799 IN TXT "v=spf1 a mx ip4:69.61.241.46 ~all" 


---------------------------------------------------------- 
DKIM check details: 
---------------------------------------------------------- 

Result: invalid 
ID(s) verified: [email protected] 
Selector= 
domain= 
DomainKeys DNS Record=._domainkey. 

---------------------------------------------------------- 
SpamAssassin check details: 
---------------------------------------------------------- 
SpamAssassin 3.4.1 (2015-04-28) 

Result: ham (non-spam) (04.6points, 10.0 required) 

pts rule name description 
---- ---------------------- ------------------------------- 


* 3.5 BAYES_99 BODY: Bayes spam probability is 99 to 100% 
* [score: 1.0000] 
* -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 
* -0.0 SPF_PASS SPF: sender matches SPF record 
* 0.2 BAYES_999 BODY: Bayes spam probability is 99.9 to 100% 
* [score: 1.0000] 
* 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily 
* valid 
* 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS 
* 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 
X-Spam-Status: Yes, hits=4.6 required=-20.0 tests=BAYES_99,BAYES_999, 
DKIM_SIGNED,RDNS_NONE,SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID autolearn=no 
autolearn_force=no version=3.4.0 
X-Spam-Score: 4.6 

To learn more about the terms used in the SpamAssassin report, please search 
here: http://wiki.apache.org/spamassassin/ 

========================================================== 
Explanation of the possible results (adapted from 
draft-kucherawy-sender-auth-header-04.txt): 
========================================================== 

"pass" 
the message passed the authentication test. 

"fail" 
the message failed the authentication test. 

"softfail" 
the message failed the authentication test, and the authentication 
method has either an explicit or implicit policy which doesn't require 
successful authentication of all messages from that domain. 

"neutral" 
the authentication method completed without errors, but was unable 
to reach either a positive or a negative result about the message. 

"temperror" 
a temporary (recoverable) error occurred attempting to authenticate 
the sender; either the process couldn't be completed locally, or 
there was a temporary failure retrieving data required for the 
authentication. A later retry may produce a more final result. 

"permerror" 
a permanent (unrecoverable) error occurred attempting to 
authenticate the sender; either the process couldn't be completed 
locally, or there was a permanent failure retrieving data required 
for the authentication. 


========================================================== 
Original Email 
========================================================== 

From [email protected] Wed Apr 12 17:41:22 2017 
Return-path: <[email protected]> 
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on isnotspam.com 
X-Spam-Flag: YES 
X-Spam-Level: **** 
X-Spam-Report: 
* 3.5 BAYES_99 BODY: Bayes spam probability is 99 to 100% 
* [score: 1.0000] 
* -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 
* -0.0 SPF_PASS SPF: sender matches SPF record 
* 0.2 BAYES_999 BODY: Bayes spam probability is 99.9 to 100% 
* [score: 1.0000] 
* 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily 
* valid 
* 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS 
* 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 
X-Spam-Status: Yes, hits=4.6 required=-20.0 tests=BAYES_99,BAYES_999, 
DKIM_SIGNED,RDNS_NONE,SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID autolearn=no 
autolearn_force=no version=3.4.0 
Envelope-to: [email protected] 
Delivery-date: Wed, 12 Apr 2017 17:41:22 +0000 
Received: from [69.61.241.46] (helo=linnabary.us) 
by localhost.localdomain with esmtp (Exim 4.84_2) 
(envelope-from <[email protected]>) 
id 1cyMGg-0007x2-1Q 
for [email protected]; Wed, 12 Apr 2017 17:41:22 +0000 
dkim-signature: v=1; a=rsa-sha256; d=linnabary.us; s=dkim; 
c=relaxed/relaxed; q=dns/txt; h=From:Subject:Date:Message-ID:To:MIME-Version:Content-Type:Content-Transfer-Encoding; 
bh=Ns4aRUgWUtil4fiVnvitgeV+q1K/smEYtRGN497S5Ew=; 
b=Nc2Kzrzas0QqMpWM4fnF5o5wLWlWYFxlGlAipe+85H9cwGgc4hvEKUj1UvgB6I2VHUbJ0OGN/sJO9tjWgwlGypaUuW7Q8x/iI0UtC6cn7X6ZLHT+K6A2A6MdoyR1NF4xxvqPadcmcQwnrY0Tth4ycydpQMlBCZS30sc1qUjUrN0= 
Received: from [192.168.1.12] (Aurora [192.168.1.12]) 
by linnabary.us with ESMTPA 
; Wed, 12 Apr 2017 13:41:28 -0400 
To: [email protected] 
From: Admin <[email protected]> 
Subject: Welcome to Linnabary 
Message-ID: <[email protected]> 
Date: Wed, 12 Apr 2017 13:41:28 -0400 
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 
Thunderbird/45.8.0 
MIME-Version: 1.0 
Content-Type: text/plain; charset=utf-8; format=flowed 
Content-Transfer-Encoding: 7bit 
X-DKIM-Status: invalid (pubkey_unavailable) 
I honestly have no idea what I should put in here in order to protect 
myself from filters, so I'm just making it up as I go. 

- Tad 
+0

我看不到'dkim._domainkey.linnabary.us'的TXT记录。测试电子邮件的签名如何显示?它是否包含正确的域('d = linnabary.us')和选择器('s = dkim')?另外,**不要使用在线工具来生成密钥**!使用'openssl'或类似的东西在你的机器上生成它们。您链接的站点在POST请求的响应中向您发送公钥/私钥对。即使他们说他们没有保存它,也没有办法检查他们是否真的没有,所以当你得到钥匙时应该被视为妥协。 – mata

回答

1

您的TXT条目主机值应该只是dkim._domainkey。目前,您的域名密钥位于:dkim._domainkey.linnabary.us.linnabary.us,因此您不应在此处添加域名。

这就是为什么对测试电子邮件的回复显示为X-DKIM-Status: invalid (pubkey_unavailable) - 公钥无法找到的原因。

+0

这是问题所在。现在一切正常。 – Kayot