升级到 WHM/cPanel 11.30 后,PHPMailer 邮件被 exim 拒绝
更新到 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是来自 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