简体   繁体   English

如何避免电子邮件标题收到:来自未知和电子邮件转发垃圾邮件

[英]how to avoid email header Received: from unknown and email going to spam

I try to send email from our server using php and Zend_Mail. 我尝试使用php和Zend_Mail从我们的服务器发送电子邮件。 I use smtp transport. 我用smtp传输。 This is confimation email of subscribing. 这是订阅的混乱电子邮件。 But for some reason email that I send has strange headers and email goes to spam folder (I see them in gmail that receive letter): 但由于某种原因,我发送的电子邮件有奇怪的标题和电子邮件转到垃圾邮件文件夹(我在收到信件的gmail中看到它们):

 Message-Id: <50ee94f7.84fc440a.62dc.ffff9685SMTPIN_ADDED_MISSING@mx.google.com>
    Received: (qmail 10943 invoked from network); 10 Jan 2013 10:16:22 -0000
    Received: from unknown (HELO searchboxindustries.com)  (username@searchboxindustries.com@207.162.215.30)

What does it mean list header "Recieved: from unknown"? 列表标题“收到:来自未知”是什么意思? Can it make email go to spam? 可以让电子邮件发送到垃圾邮件吗? How to avoid this strange header and make email avoid spam folder? 如何避免这个奇怪的标题并使电子邮件避免垃圾邮件文件夹 Is there any problem with coode or maybe I have some problems with DNS settings of this domain? coode有什么问题,或者我对这个域的DNS设置有问题吗?

Here's code for setting headers: 这是设置标题的代码:

$mailer->setFrom($params['list_email'], $params['list_from_name']);
$mailer->setReplyTo($params['list_email']);

$mailer->addHeader('Sender', $params['list_email'] . '.searchboxindustries.com');                       
$mailer->setReturnPath($params['list_email'] . '.searchboxindustries.com');         

$mailer->addTo($params['email_address']);

Code to configure transport: 配置传输的代码:

$emailConfig = $this->getOption('email');                                   
        $transport = new Zend_Mail_Transport_Smtp($emailConfig['server'], $emailConfig);
Zend_Mail::setDefaultTransport($transport);

Email config from application.ini: 来自application.ini的电子邮件配置:

   email.name  = searchboxindustries.com
   email.server = searchboxindustries.com
   email.username = user_name
   email.password = password
   email.auth = plain
   email.port = 587

Here are headers of such email: 以下是此类电子邮件的标题:

Delivered-To: gala19612009@gmail.com
Received: by 10.76.94.204 with SMTP id de12csp111150oab;
        Fri, 11 Jan 2013 01:58:49 -0800 (PST)
X-Received: by 10.69.0.8 with SMTP id au8mr228881813pbd.58.1357898329423;
        Fri, 11 Jan 2013 01:58:49 -0800 (PST)
Return-Path: <opp@mail15.com.searchboxindustries.com>
Received: from smtp1-1.searchboxindustries.com (mta1.searchboxindustries.com. [207.162.215.30])
        by mx.google.com with SMTP id d7si4727205paw.95.2013.01.11.01.58.48;
        Fri, 11 Jan 2013 01:58:48 -0800 (PST)
Received-SPF: pass (google.com: domain of opp@mail15.com.searchboxindustries.com designates 207.162.215.30 as permitted sender) client-ip=207.162.215.30;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of opp@mail15.com.searchboxindustries.com designates 207.162.215.30 as permitted sender) smtp.mail=opp@mail15.com.searchboxindustries.com
Message-Id: <50efe258.a74b420a.3351.12fcSMTPIN_ADDED_MISSING@mx.google.com>
Received: (qmail 21583 invoked from network); 11 Jan 2013 09:58:48 -0000
Received: from unknown (HELO searchboxindustries.com) (username@searchboxindustries.com@207.162.215.30)
  by searchboxindustries.com with SMTP; 11 Jan 2013 09:58:48 -0000
From: Oleg <opp@mail15.com>
Reply-To: opp@mail15.com
Sender: opp@mail15.com.searchboxindustries.com
Return-Path: opp@mail15.com.searchboxindustries.com
To: gala19612009@gmail.com
Subject: List1: Confirm Subscription
Date: Fri, 11 Jan 2013 04:58:48 -0500
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
MIME-Version: 1.0

Spf seems to be ok. Spf似乎没问题。 The ip from which email is sent is not blacklisted. 发送电子邮件的IP未列入黑名单。

Now there are changes in DNS and I have headers: 现在DNS有变化,我有标题:

Message-Id: <50f41c80.67e3440a.2d32.6aabSMTPIN_ADDED_MISSING@mx.google.com>
Received: (qmail 18457 invoked from network); 14 Jan 2013 14:55:59 -0000
Received: from unknown (HELO smtp1-1.searchboxindustries.com) (username@searchboxindustries.com@207.162.215.30)
  by searchboxindustries.com with SMTP; 14 Jan 2013 14:55:59 -0000

We have Reverse DNS set. 我们有反向DNS设置。 207.162.215.30 is resolved to stmp1.searchboxindustries.com. 207.162.215.30已解析为stmp1.searchboxindustries.com。 What's the problem then? 那有什么问题呢? I wonder what is strange format in brackets in the header Received : from unknow: 我想知道标题中括号中的奇怪格式是什么:来自未知:

 username@searchboxindustries.com@207.162.215.30

The Received: from unknown simply means that one SMTP server receiveid it from another which did not provide reverse DNS. Received: from unknown表示一个SMTP服务器从另一个不提供反向DNS的SMTP服务器接收它。 Typically each hop from one SMTP server to another adds one Received: header at the top of the message (except qmail , which adds two; this is visible in your example). 通常,从一个SMTP服务器到另一个SMTP服务器的每个跃点在消息顶部添加一个Received:标头( qmail除外,它添加两个;这在您的示例中可见)。

If you are concerned about the lack of reverse DNS, and if 207.162.215.30 is yours, then perhaps you can convince your ISP to provide reverse DNS for it. 如果您担心缺少反向DNS,并且207.162.215.30是您的,那么也许您可以说服您的ISP为其提供反向DNS。 Many ISPs refuse (if you are on a "consumer" broadband plan), or will require a different hosting contract with you in order to offer this service. 许多ISP拒绝(如果您使用的是“消费者”宽带计划),或者需要与您签订不同的托管合同才能提供此服务。 ("Reverse DNS" means that when somebody queries DNS for "what's the DNS name of 207.162.215.30" the answer would be "searchboxindustries.com" or perhaps another host name, but not "unknown".) (“反向DNS”表示当有人向DNS查询“DNS名称207.162.215.30”时,答案将是“searchboxindustries.com”或者可能是其他主机名,但不是“未知”。)

The reverse DNS lookup is usually performed based on the TCP headers, not on the text of the message. 反向DNS查找通常基于TCP标头执行,而不是基于消息文本执行。 If the SMTP server receives a connection from 123.45.67.89 then it will perform reverse DNS for that address, and put the results in the Received: header it adds. 如果SMTP服务器从123.45.67.89收到连接,则它将为该地址执行反向DNS,并将结果放入它添加的Received:头中。 In other words, the contents of your message headers or envelope headers do not affect this outcome at all. 换句话说,邮件标题或信封标题的内容根本不会影响此结果。

Recipients can do whatever they want with these headers. 收件人可以使用这些标头做任何他们想做的事情。 It is unlikely that this header alone (the presence of this header, or the absence of reverse DNS information evident from the contents of it) would be sufficient for somebody to classify your message as spam, but there is really no way to control what the recipient does with this information. 单独使用此标头(此标头的存在,或者没有反向DNS信息从其中显而易见)对于某人将您的邮件归类为垃圾邮件是不够的,但实际上没有办法控制收件人使用此信息。

If anything, your question is an indication that perhaps you should be looking at a professional service to send out these messages on your behalf, for a fee. 如果有的话,您的问题可能表明您可能正在寻找专业服务代表您发送这些消息,但需要付费。

Try the following options to find where the problem is: 请尝试以下选项以查找问题所在:

  1. Does the email has body? 电子邮件是否有正文? I believe there is email body. 我相信有电子邮件正文。
  2. For isolating the problem, you can try it using another alternative SMTP (for example: gmail smtp). 要隔离问题,可以使用其他备用SMTP(例如:gmail smtp)进行尝试。
  3. Alternatively, you can use PHP mail directly without smtp. 或者,您可以直接使用PHP邮件而不使用smtp。

我的服务器需要一个额外的(php。)ini设置,可能会解决你的问题吗?

ini_set('sendmail_from', 'enterAValidEmailAddr@yourDomainHere');

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

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