gpt4 book ai didi

ssl - 我是否需要安装 SSL 才能实现 DKIM

转载 作者:太空宇宙 更新时间:2023-11-03 12:54:15 25 4
gpt4 key购买 nike

我正在使用 open-dkim 和 phpmailer 来签署我的外发邮件,我安装了我的 key ,并显示为有效,并且邮件脚本正在运行,但我遇到一个 openSSL 错误,它阻碍了这个过程:

Warning: openssl_sign() [function.openssl-sign]: supplied key param cannot be coerced into a private key in /usr/share/php/class.phpmailer.php on line 2221

我对 openssl 一无所知,但我的第一个想法是这个域没有安装 SSL,所以 DKIM 可能需要它?如果是这样,是像往常一样安装新的 SSL 一样简单,还是我必须以某种方式将公钥/私钥与 SSL 相关联?

谢谢

如果需要,完整的脚本:

<?

require_once("class.phpmailer.php");
$mailer = new PHPMailer();


$mailer->IsSMTP();
$mailer->Host = 'mail.domain.com';
$mailer->SMTPAuth = true;

$mailer->Username = 'info@domain.com';
$mailer->Password = 'pass';
$mailer->FromName = 'info@domain.com';
$mailer->From = 'info@domain.com';
$mailer->AddAddress('test@gmail.com','first last');
$mailer->Subject = 'Testing DKIM';

$mailer->DKIM_domain = 'domain.com';
$mailer->DKIM_private = 'private.txt';
$mailer->DKIM_selector = 'default'; //this effects what you put in your DNS record
$mailer->DKIM_passphrase = '';


$mailer->Body = 'this is just an email test';

if(!$mailer->Send())
{
echo "Message was not sent";
echo "Mailer Error: " . $mailer->ErrorInfo;
exit;
} else {
echo "Message Sent!";
}

?>

最佳答案

答案分为两部分:

1) 不,您显然不需要安装传统 SSL 即可使用 DKIM

2) 我的错误是由于从添加了额外字符的 RTF 文档中复制了我的私钥。我将它复制到 Dreamweaver 中,去掉了多余的字符,现在我从我的服务器收到了签名电子邮件

关于ssl - 我是否需要安装 SSL 才能实现 DKIM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15296158/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com