升级到 WHM/cPanel 11.30 后,PHPMailer 邮件被 exim 拒绝

发布于 2024-11-18 05:37:20 字数 942 浏览 4 评论 0原文

更新到 WHM/cPanel 11.30.0 后,PHPMailer 邮件现在被 exim 拒绝。这是我的代码:

$mail = new PHPMailer();

$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Password = '****';
$mail->Host = "mail.***.com";
$mail->Username = '***@***.com';
$mail->From = "***@***.com";
$mail->FromName = '***@***.com';            
$mail->AddAddress($recipient);  
$mail->Subject = $subject;
$mail->Body = $body;
$result = $mail->Send();

PHPMailer 返回时没有错误,但在 exim 拒绝日志中显示

H=(localhost.localdomain) [anip] F=[电子邮件受保护]>拒绝 RCPT <[电子邮件受保护]>:(localhost.localdomain)当前不允许 [anip] 通过此服务器进行中继。也许您在过去 30 分钟内没有登录 pop/imap 服务器,或者没有在您的电子邮件客户端中打开 SMTP 身份验证。

有人可以帮忙吗?

After updating to WHM/cPanel 11.30.0, PHPMailer mails are now being rejected by exim. This is my code:

$mail = new PHPMailer();

$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Password = '****';
$mail->Host = "mail.***.com";
$mail->Username = '***@***.com';
$mail->From = "***@***.com";
$mail->FromName = '***@***.com';            
$mail->AddAddress($recipient);  
$mail->Subject = $subject;
$mail->Body = $body;
$result = $mail->Send();

PHPMailer is returning with no errors but in the exim reject log it says

H=(localhost.localdomain) [a.n.i.p] F=<[email protected]> rejected RCPT <[email protected]>: (localhost.localdomain) [a.n.i.p] is currently not permitted to relay through this server. Perhaps you have not logged into the pop/imap server in the last 30 minutes or do not have SMTP Authentication turned on in your email client.

Can anyone help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

琉璃繁缕 2024-11-25 05:37:20

这是来自 exim 的一条非常常见且复杂的错误消息,但其缺点是服务器未设置为接受来自收件人域的电子邮件。

更新可能会清除您的中继主机中定义的所有 IP。确保您发送的主机已添加到 /etc/exim_smtp_whitelist,并且该主机正在您的 cpanel 配置中使用。

宽度> Exim 配置编辑器 >高级编辑器

接受主机 = /etc/exim_smtp_whitelist

This is a really common, convoluted error message from exim, but the short of it is that the server isn't set up to accept email from the recipient domain.

It possible that the update has cleared out any IP's defined in your relayhosts. Make sure the host your sending from is added to the /etc/exim_smtp_whitelist, and that this is being used in your cpanel configuration.

WHM > Exim Configuration Editor > Advanced Editor

accept hosts = /etc/exim_smtp_whitelist

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文