简体   繁体   English

使用CodeIgniter发送电子邮件时,将IP地址HELO'ing修复为“ localhost.localdomain”

[英]Fix IP address HELO'ing as “localhost.localdomain” when using CodeIgniter to send email

I am using CodeIgniter to send emails, and for some reason my IP address is ending up on the Composite Blocking List at http://cbl.abuseat.org/ . 我正在使用CodeIgniter发送电子邮件,由于某种原因,我的IP地址最终出现在http://cbl.abuseat.org/的“复合阻止列表”上。 This website believes that my server is infected with a spam sending trojan, proxy or some other form of botnet and it is not. 该网站认为我的服务器感染了发送木马,代理或其他形式的僵尸网络的垃圾邮件,但事实并非如此。

Here is the code that I use to send messages: 这是我用来发送消息的代码:

function _send_user_email($to, $subject, $message) {
$this->load->library('email');
$config['charset'] = 'utf-8';
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';    
$config['protocol'] = 'sendmail';
$this->email->initialize($config);
$this->email->from('support@mydomain.com', 'Customer Service');
$this->email->reply_to('support@mydomain.com', 'Customer Service');
$this->email->to($to);
$this->email->bcc('support@mydomain.com');
$this->email->subject($subject);
$this->email->message($message);
if ( ! $this->email->send())
{
    echo $this->email->print_debugger();
    exit;
} 
} 

Here is the error message that I am getting from the Composite Blocking List: 这是我从复合阻止列表中得到的错误消息:

This IP address is HELO'ing as "localhost.localdomain" which violates the relevant standards (specifically: RFC5321). 该IP地址被HELO称为“ localhost.localdomain”,这违反了相关标准(特别是:RFC5321)。

The CBL does not list for RFC violations per-se. CBL本身未列出RFC违规情况。 This particular behaviour, however, correlates strongly to spambot infections. 但是,这种特殊行为与垃圾邮件机器人感染密切相关。 In other words, out of thousands upon thousands of IP addresses HELO'ing this way, all but a handful are infected and spewing junk. 换句话说,以这种方式在成千上万的IP地址中,除了极少数以外,几乎所有的IP地址都已被感染并冒出垃圾。 Even if it isn't an infection, it's a misconfiguration that should be fixed, because many spam filtering mechanisms operate with the same rules, and it's best to fix it regardless of whether the CBL notices it or not. 即使它不是感染,也应该纠正它的错误配置,因为许多垃圾邮件过滤机制都以相同的规则运行,并且无论CBL是否注意到,都最好对其进行修复。

What do I need to change in this code so that I can overcome this error and get my IP address removed from the block list? 我需要在此代码中进行哪些更改,以便克服此错误并将IP地址从阻止列表中删除? Thanks. 谢谢。

Your mail server seems to be misconfigured . 您的邮件服务器似乎配置错​​误 I had similar issues in the past, it seems to be a Mail Server Naming Problems. 我过去有类似的问题,这似乎是邮件服务器命名问题。 I was sending mail from a misconfigured dedicated server which didnt have a hostname (Reverse DNS) properly configured. 我从配置错误的专用服务器发送邮件,该服务器没有正确配置主机名(反向DNS)。

You might want to test whether your mail server is misconfigured is to send an email through it to helocheck@helocheck.abuseat.org. 您可能要测试您的邮件服务器是否配置错误,是要通过它发送电子邮件到helocheck@helocheck.abuseat.org。 You will probably get a virtually immediate rejection. 您实际上可能会立即遭到拒绝。 http://cbl.abuseat.org/helocheck.html http://cbl.abuseat.org/helocheck.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM