如何避免电子邮件标题收到:来自未知和电子邮件进入垃圾邮件 [英] how to avoid email header Received: from unknown and email going to spam

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

问题描述

我尝试使用 php 和 Zend_Mail 从我们的服务器发送电子邮件.我使用 smtp 传输.这是订阅的确认电子邮件.但由于某种原因,我发送的电子邮件有奇怪的标题,并且电子邮件进入垃圾邮件文件夹(我在 gmail 中看到它们收到信):

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)

列表标题已收到:来自未知"是什么意思?它可以使电子邮件成为垃圾邮件吗?如何避免这个奇怪的标题并使电子邮件避免垃圾邮件文件夹?coode 是否有任何问题,或者我对该域的 DNS 设置有问题?

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

配置传输的代码:

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

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

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 似乎没问题.发送电子邮件的 ip 未列入黑名单.

Spf seems to be ok. The ip from which email is sent is not blacklisted.

现在 DNS 发生了变化,我有了标头:

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

我们设置了反向 DNS.207.162.215.30 被解析为 stmp1.searchboxindustries.com.那有什么问题呢?我想知道标题 Received 中括号中的奇怪格式是什么:来自未知:

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

推荐答案

Received: from unknown 仅仅意味着一个 SMTP 服务器从另一个不提供反向 DNS 的 SMTP 服务器接收到它.通常,从一个 SMTP 服务器到另一个 SMTP 服务器的每一跳都会在消息顶部添加一个 Received: 标头(qmail 除外,它会添加两个;这在您的示例中可见).

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

如果您担心缺少反向 DNS,并且如果 207.162.215.30 是您的,那么也许您可以说服您的 ISP 为其提供反向 DNS.许多 ISP 拒绝(如果您使用消费者"宽带计划),或者需要与您签订不同的托管合同才能提供此服务.(反向 DNS"意味着当有人向 DNS 查询207.162.215.30 的 DNS 名称是什么"时,答案将是searchboxindustries.com"或其他主机名,但不是未知".)

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

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

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.

收件人可以对这些标头做任何他们想做的事情.仅此标头(此标头的存在,或从其内容中明显没有反向 DNS 信息)不太可能足以让某人将您的邮件分类为垃圾邮件,但实际上没有办法控制收件人使用此信息.

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天全站免登陆