我希望有人能帮助我,因为我已经拉头发并在两端燃烧蜡烛一个多星期了!
好的,在任何人说什么之前,是的,我将显示所有密码和 DKIM 字符串,一旦我开始工作,我将删除这个域,我刚刚回到基础进行测试。
基本上,我已经从几个来源生成了 DKIM 密钥,DKIM Core、openssl 和 worxware,我目前正在测试来自 worxware 的一个,它是......
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,3C3BC78B0311AA1A
+omRObgdkAdTAZZbWHvbf+E5S6swHoHUr4rW5yp+BmadMlUMT3Jpkm5HJc1Dd26I
bzDAHy9+m9xf3EQLkIcAdNXFwKmgll8AAcJoBRjPDLnt4zmJBgLAyPSZ3h8OI1UE
lHcDjoUVtIWqNDi1uQXwyi3DrftzyLdxeHDpbXDLcy/qyhZsrnvs4smWAvxcLo8g
Fwq1o1IpxQawariOH+C4oxbENCHoCh7WZi0qnECjyPbi4aqvf0SSDAc3eYH9x0+s
c9Ne2DXq7w4sX6md/pd8EChvo8g+OYcuTKSPKZborQibnvrvXs1G+e2kDSF78x/Y
SXhIyXL3WXcAuNwqeGVSKIUMd+HelSWAjnQYI3JI792nzuj0S78WlP0i+oUtcWy+
V+RsLJlWGZJql1KHrXFUdBvMdYhmBhmdNqdyUWOKxgYwHB7EHgvYP4Ho2ijxr3U1
qjczGAr4h5WtHTvBgUp25EwEyhcFAWX1MlAT9+C5qTsO8vDavi/uLI805WyKgwFN
jp7qx2CmlSmpIwPhvrV88ajf119yHveQHYPIfXg2ZOo2AGrJeDmvp0S3B6BSY4EU
1YODRaoZVMQCaJHPkTwEe4hc2IHrA1y6ZcnYpu1K1a81uvXVDzvfylqqG3SjLwfP
iZ6vhC2E/Ncjnvi4eJt9+j67HSA4CYhpxMTvOI+4zrdK/Pucar0saNeFQQnJ3sNM
0cnl+Z/XCH30ERi3GuDAJXWkUkJvKfbk2dwXW8QgdOZIdU+Gj0gDCevdR8wsO5Vr
yDUXIErZcdZvlaqEcviUOBbJ0LMm7d/1DL5QAvVl1an76YT/qChzZQ==
-----END RSA PRIVATE KEY-----
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDD0IviVSEPKNE+79Ky5vASLiSk
gwuGik0Ct2eeuSxhhF7TJPNBI9BQl6FK3ggdwWcuB6kjCQPdivnuaZi7Ql9CI66T
V5AC/JSbx1D9wkg/jvwCiQIMCWqoIbAgu3SkxlfjzMLyIhZytzlqFQqUSyj4n6BU
IwwDLDviEJna1dj2iwIDAQAB
-----END PUBLIC KEY-----
对于 PhpMailer 我有....
尝试使用和不使用 ->Clear.... 尝试编码 base64、7bit 并且没有尝试选择器“默认”和“phpmailer”,但是两者都在我的 DNS 中配置;即使我设置为“phpmailer”,它似乎也会发送“默认”
代码是……
/* Configure PHP Mailer */
$vlMailMessage = new PHPMailer;
$vlMailMessage->ClearAddresses();
$vlMailMessage->ClearCCs();
$vlMailMessage->ClearBCCs();
$vlMailMessage->ClearReplyTos();
$vlMailMessage->ClearAllRecipients();
$vlMailMessage->ClearAttachments();
$vlMailMessage->ClearCustomHeaders();
$vlMailMessage->isSMTP();
$vlMailMessage->SMTPDebug = 2;
$vlMailMessage->Host = 'a2plcpnl0360.prod.iad2.secureserver.net';
$vlMailMessage->Username = 'admin@dubaidatabase.net';
$vlMailMessage->Password = 'R9#khthnQS';
$vlMailMessage->Port = 587;
$vlMailMessage->SMTPSecure = 'SSL';
$vlMailMessage->SMTPAuth = true;
$vlMailMessage->Encoding = 'base64';
/* Configure Email */
$vlMailMessage->From = 'admin@dubaidatabase.net';
$vlMailMessage->FromName = 'Admin';
$vlMailMessage->addAddress($em, 'Mail Test');
$vlMailMessage->addBcc('white.shaun@alankah.com');
//$vlMailMessage->addBcc('jshaunwhite71@gmail.com');
$vlMailMessage->addReplyTo('admin@dubaidatabase.net', 'Admin');
$vlMailMessage->isHTML(true);
$vlMailMessage->Subject = 'DKIM Test '.$sb;
$vlMailMessage->Body = "<p style='font-family:Arial, Helvetica, sans-serif;'>Hi,<br /><br />Just trying to configure the DKIM Signature!</p>";
$vlMailMessage->AltBody = "Hi".chr(10).chr(10)."Just trying to configure the DKIM Signature!";
/* Configure Email DKIM */
$vlMailMessage->DKIM_domain = 'dubaidatabase.net';
$vlMailMessage->DKIM_private = 'Proc-Type: 4,ENCRYPTEDDEK-Info: DES-EDE3-CBC,3C3BC78B0311AA1A+omRObgdkAdTAZZbWHvbf+E5S6swHoHUr4rW5yp+BmadMlUMT3Jpkm5HJc1Dd26IbzDAHy9+m9xf3EQLkIcAdNXFwKmgll8AAcJoBRjPDLnt4zmJBgLAyPSZ3h8OI1UElHcDjoUVtIWqNDi1uQXwyi3DrftzyLdxeHDpbXDLcy/qyhZsrnvs4smWAvxcLo8gFwq1o1IpxQawariOH+C4oxbENCHoCh7WZi0qnECjyPbi4aqvf0SSDAc3eYH9x0+sc9Ne2DXq7w4sX6md/pd8EChvo8g+OYcuTKSPKZborQibnvrvXs1G+e2kDSF78x/YSXhIyXL3WXcAuNwqeGVSKIUMd+HelSWAjnQYI3JI792nzuj0S78WlP0i+oUtcWy+V+RsLJlWGZJql1KHrXFUdBvMdYhmBhmdNqdyUWOKxgYwHB7EHgvYP4Ho2ijxr3U1qjczGAr4h5WtHTvBgUp25EwEyhcFAWX1MlAT9+C5qTsO8vDavi/uLI805WyKgwFNjp7qx2CmlSmpIwPhvrV88ajf119yHveQHYPIfXg2ZOo2AGrJeDmvp0S3B6BSY4EU1YODRaoZVMQCaJHPkTwEe4hc2IHrA1y6ZcnYpu1K1a81uvXVDzvfylqqG3SjLwfPiZ6vhC2E/Ncjnvi4eJt9+j67HSA4CYhpxMTvOI+4zrdK/Pucar0saNeFQQnJ3sNM0cnl+Z/XCH30ERi3GuDAJXWkUkJvKfbk2dwXW8QgdOZIdU+Gj0gDCevdR8wsO5VryDUXIErZcdZvlaqEcviUOBbJ0LMm7d/1DL5QAvVl1an76YT/qChzZQ==';
//$vlMailMessage->DKIM_selector = 'phpmailer';
$vlMailMessage->DKIM_selector = 'default';
$vlMailMessage->DKIM_passphrase = '1447649625';
$vlMailMessage->DKIM_identity = 'admin@dubaidatabase.net';
//$vlMailMessage->DKIM_identifier = 'admin@dubaidatabase.net';
/* Send Email */
if($vlMailMessage->send()) {
echo "Sent";
}
在我的 DNS 区域文件 TXT 中,我有两个条目
defult._domainkey
phpmailer._domainkey
两者都与...
v=DKIM1; k=rsa; g=*; s=email; h=sha1; t=s; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDD0IviVSEPKNE+79Ky5vASLiSkgwuGik0Ct2eeuSxhhF7TJPNBI9BQl6FK3ggdwWcuB6kjCQPdivnuaZi7Ql9CI66TV5AC/JSbx1D9wkg/jvwCiQIMCWqoIbAgu3SkxlfjzMLyIhZytzlqFQqUSyj4n6BUIwwDLDviEJna1dj2iwIDAQAB;
我通过 isnotspam.com 和 mail-tester.com 的测试都失败了。mail-tester.com 的结果是......
DomainKeys Identified Mail (DKIM) 是一种将域名与电子邮件消息相关联的方法,从而允许个人、角色或组织对消息声明某些责任。您的消息的 DKIM 签名是:
v=1;
a=rsa-sha256;
q=dns/txt;
c=relaxed/relaxed;
d=dubaidatabase.net;
s=default;
h=Content-Type:MIME-Version:Message-ID:Subject:Reply-To:From:To:Date;
bh=7tYFFZGWrvPk1/5Sfj/dbza6mTupPONFamO5Udr9ATs=;
b=Z58axwQs3S/MN7xmdWO1oS6SYEBwN9Pn3irSkpi3v6IiXpRTSvWddJVBZoELGpKeEac0bxzqXb986tfHv1llwSgv+dImQ7f5YM5R0SS3OQ7Q940gvYz6N1cnwwiFL+Ogn7DOfxL6nehn0Z/JM4yqs7K92UV+arm/n2954ZdwjnaSyKyfBiZaTRcBn6qaV/X6rmy8wVc5STawyHTIsxg3dAP+U3akBrt8cucqOaOByv8pPQPAOXRZdLLedN7ojS5ycJvQWzHsLbPBa9N2DXDvVr6fpRUxHEXiqPYRgwFGkdf+maSzeVCzpiMhDpsmdrcmUqTAxuLSVAlrBGUC2didiQ==;
您的公钥是:
"v=DKIM1;
k=rsa;
g=*;
s=email;
h=sha1;
t=s;
p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDD0IviVSEPKNE+79Ky5vASLiSkgwuGik0Ct2eeuSxhhF7TJPNBI9BQl6FK3ggdwWcuB6kjCQPdivnuaZi7Ql9CI66TV5AC/JSbx1D9wkg/jvwCiQIMCWqoIbAgu3SkxlfjzMLyIhZytzlqFQqUSyj4n6BUIwwDLDviEJna1dj2iw""IDAQAB;
" 密钥长度:1024bits
您的 DKIM 签名无效
有人可以请求帮助吗 :)