如何避免电子邮件头接收:从未知和电子邮件到垃圾邮件 [英] how to avoid email header Received: from unknown and email going to spam

查看:158
本文介绍了如何避免电子邮件头接收:从未知和电子邮件到垃圾邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用php和Zend_Mail从我们的服务器发送电子邮件。我使用smtp传输。这是订阅的电邮。但由于某些原因,我发送的电子邮件有奇怪的标题和电子邮件去垃圾邮件文件夹(我看到他们在gmail收到信件):

  Message-Id:< 50ee94f7.84fc440a.62dc.ffff9685SMTPIN_ADDED_MISSING@mx.google.com> 
收到:(qmail 10943从网络调用); 10 Jan 2013 10:16:22 -0000
收到:来自未知(HELO searchboxindustries.com)(username @ searchboxindustries.com @ 207.162.215.30)

这是什么意思列表标题已接收:从未知?邮件可以发送到垃圾邮件吗?如何避免这个奇怪的标题,并使邮件避免垃圾邮件文件夹?是否有任何问题的coode或者也许我有一些这个域名的DNS设置的问题?



以下是设置标题的代码:

  $ 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']);

配置传输的代码:

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

从application.ini发送电子邮件配置:

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

这是电子邮件的标题:

 已交付到:gala19612009@gmail.com 
收到:10.76.94.204与SMTP id de12csp111150oab;
Fri,11 Jan 2013 01:58:49 -0800(PST)
X-Received:由10.69.0.8与SMTP id au8mr228881813pbd.58.1357898329423;
Fri,11 Jan 2013 01:58:49 -0800(PST)
返回路径:< opp@mail15.com.searchboxindustries.com>
收到:来自smtp1-1.searchboxindustries.com(mta1.searchboxindustries.com。[207.162.215.30])
由mx.google.com与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指定为207.162.215.30,允许sender)client-ip = 207.162.215.30;
验证结果:mx.google.com;
spf = pass(google.com:domain of opp@mail15.com.searchboxindustries.com指定为允许的发件人207.162.215.30)smtp.mail=opp@mail15.com.searchboxindustries.com
Message- Id:< 50efe258.a74b420a.3351.12fcSMTPIN_ADDED_MISSING@mx.google.com>
收到:(qmail 21583从网络调用); 11 Jan 2013 09:58:48 -0000
收到:来自未知(HELO searchboxindustries.com)(username @ searchboxindustries.com @ 207.162.215.30)
由searchboxindustries.com与SMTP; 11 Jan 2013 09:58:48 -0000
From:Oleg< opp@mail15.com&
回复:opp@mail15.com
发件人:opp@mail15.com.searchboxindustries.com
返回路径:opp@mail15.com.searchboxindustries.com
To :gala19612009@gmail.com
主题:List1:确认订阅
日期:Fri,11 Jan 2013 04:58:48 -0500
Content-Type:text / html; charset = utf-8
Content-Transfer-Encoding:quoted-printable
Content-Disposition:inline
MIME版本:1.0

Spf似乎没问题。
发送电子邮件的ip不是黑名单。



现在DNS有变化,我有标题:

  Message-Id:< 50f41c80.67e3440a.2d32.6aabSMTPIN_ADDED_MISSING@mx.google.com> 
收到:(qmail 18457从网络调用); 14 Jan 2013 14:55:59 -0000
收到:来自未知(HELO smtp1-1.searchboxindustries.com)(username @ searchboxindustries.com @ 207.162.215.30)
由searchboxindustries.com与SMTP; 14 Jan 2013 14:55:59 -0000

我们有反向DNS设置。 207.162.215.30解析为stmp1.searchboxindustries.com。那么问题是什么?我想知道标题中括号中的奇怪格式是什么收到:from unknow:

  username @ searchboxindustries.com @ 207.162.215.30 


解决方案

收到的 / code>只是意味着一个SMTP服务器从另一个不提供反向DNS的DNS服务器接收它。通常,从一个SMTP服务器到另一个SMTP服务器的每一跳都会在邮件的顶部添加一个 Received:标头( qmail 除外)如果你担心缺乏反向DNS,如果207.162.215.30是你的,那么也许你可以说服您的ISP为其提供反向DNS。许多ISP拒绝(如果您使用消费者宽带计划),或者将要求与您提供不同的托管合同,以提供此服务。 (反向DNS意味着当某人向DNS查询什么是207.162.215.30的DNS名称时,答案将是searchboxindustries.com或可能是另一个主机名,但不是未知。)



反向DNS查找通常基于TCP头执行,而不是在消息的文本上执行。如果SMTP服务器从123.45.67.89接收到一个连接,那么它将对该地址执行反向DNS,并将结果放在添加的 Received:头文件中。换句话说,您的邮件标头或信封标题的内容根本不会影响此结果。



收件人可以使用这些标头来完成所需的任何操作。这个标题不可能(这个标题的存在,或者没有反向DNS信息从它的内容中可以看出来)就足以让某人将您的消息分类为垃圾邮件,但实际上没有办法控制什么收件人可以使用此信息。



如果有任何问题,您的问题可能表明您或许应该查看专业服务代表您发送这些邮件,费用。


I try to send email from our server using php and Zend_Mail. I use smtp transport. 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):

 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?

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:

   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. The ip from which email is sent is not blacklisted.

Now there are changes in DNS and I have headers:

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. 207.162.215.30 is resolved to 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. 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).

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. 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. ("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".)

The reverse DNS lookup is usually performed based on the TCP headers, not on the text of the message. 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. 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.

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.

这篇关于如何避免电子邮件头接收:从未知和电子邮件到垃圾邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆