php邮件功能:通过gmail和hotmail标记为垃圾邮件的合法邮件 [英] php mail function: legitimate mails marked as spam by gmail and hotmail

查看:156
本文介绍了php邮件功能:通过gmail和hotmail标记为垃圾邮件的合法邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站使用PHP邮件功能向用户发送电子邮件。 Hotmail和Gmail用户不会收到它们,或者它们最终在SPAM文件夹中。

My website sends emails to users using the PHP mail function. Hotmail and Gmail users don't receive them, or they end up in SPAM-folder. Here is the header of a message marked as SPAM by Gmail.

该怎么做?

Delivered-To: koopter1982@gmail.com
Received: by 10.216.213.222 with SMTP id a72cs207473wep;
        Sat, 2 Oct 2010 04:26:47 -0700 (PDT)
Received: by 10.216.3.19 with SMTP id 19mr3099233weg.108.1286018806068;
        Sat, 02 Oct 2010 04:26:46 -0700 (PDT)
Return-Path: <admin@drt01.dco.fusa.be>
Received: from drt01.dco.fusa.be (drt01.dco.fusa.be [193.110.251.55])
        by mx.google.com with ESMTP id m29si2837219weq.203.2010.10.02.04.26.45;
        Sat, 02 Oct 2010 04:26:46 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of admin@drt01.dco.fusa.be designates 193.110.251.55 as permitted sender) client-ip=193.110.251.55;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of admin@drt01.dco.fusa.be designates 193.110.251.55 as permitted sender) smtp.mail=admin@drt01.dco.fusa.be
Received: from admin by drt01.dco.fusa.be with local (Exim 4.69)
    (envelope-from <admin@drt01.dco.fusa.be>)
    id 1P20En-000303-Lo
    for koopter1982@gmail.com; Sat, 02 Oct 2010 13:26:45 +0200
To: koopter1982@gmail.com
Subject: Koopte: zoekertje activeren
X-PHP-Script: www.koopte.be/confirmation.php for 213.118.179.121
From: Koopte <zoekertjes@koopte.be> 
Reply-To:<zoekertjes@koopte.be> 
Content-Type: text/html; charset=iso-8859-1
Message-Id: <E1P20En-000303-Lo@drt01.dco.fusa.be>
Sender:  <admin@drt01.dco.fusa.be>
Date: Sat, 02 Oct 2010 13:26:45 +0200


推荐答案

你的信封地址与地址不匹配。
这是邮件被视为垃圾邮件的主要原因。

Your envelope adress doesnt match the from adress. This is the main reason why mails are regarded as spam.

背景是:信封地址(在您的情况下为admin@drt01.dco.fusa。 be)对用户来说不是真的可见。
它刚被邮件服务器用来返回错误邮件。历史上,因为它们与管理员更相关,而不是用户。
然而今天它的事实上的标准是将包络地址设置为与用户地址相同。
垃圾邮件发送者不是真的这样做,因为他们没有可能性,或者他们不想收到发送垃圾邮件时所有的反弹错误邮件。
或者他们不希望被盗用的用户使用木马蠕虫知道他们的恶行。

The background is: The envelope adress (in your case admin@drt01.dco.fusa.be) isn't really visible to the user. Its just used by mailservers to return error mails. Historically because they are more relevant to the admin than to the user. However today its de-facto standard to set the envelope address to the same as the user address. Spammers don't really do that because they either don't have the possibility to or they don't want to recieve all the backbouncing error mails when sending spam. Or they don't want the exploited users with the trojan worm be aware of their evil-doing.

在php / sendmail中,这个函数叫做f参数。
您可以在功能文档中阅读所有内容: http:// php。 net / manual / en / function.mail.php

In php/sendmail this function is called the f parameter. You can read all about that in the function documentation: http://php.net/manual/en/function.mail.php

类似phpmailer或 libmail 做这个自己,它可能是最好的想法,使用其中一个,因为他们已经测试,是精心设计并对其发展变化作出反应!

Classes like phpmailer or libmail do this their selves and its probably the best idea to use one of theese because they have been tested, are well designed and react to changes in their developement!

您可以做的下一件事是将反向DNS设置为发件人地址相同的域。
如果你这样做,真的是值得信赖的,因为邮件可以匹配到一个服务器,因此可以与一个provbider / admin匹配,并且可以很容易被垃圾邮件网络列入黑名单。
所以如果你的垃圾邮件正确设置反向dns你不会这么做。
在arpa rulse中有一个内置的指令,这样一个条目的设置需要一段时间,所以它不能以某种方式进行虚拟和剥削。

The next thing you could do is to set the reverse-dns to the same domain that the sender adress is. If you do this you are really, really trustworthy because the mail can be matched to a server and thus to a provbider/admin and could be easily blacklisted by spam networks. So if you would spam with a correctly set up reverse dns you wouldnt do it long. There is a built-in directive in arpa rulse that the set up of such an entry takes a while so it cant be made somehow danymically and exploited.

然而,这是相当高级的,每个ip地址只能有一个反向dns条目。所以你不能在一个共享的主机环境中。
您还必须与您的供应商联系进行设置,但您可以将谷歌用于所有这些内容。

This is however rather advanced and there can only be one reverse dns entry per ip adress. So you can't do it on a shared hosting environment. You also have to contact your provider to set them up but you can google for all that stuff.

总结:


  • 更正您的信封地址,这应该很好

  • 如果可以,设置一个反向dns条目

PS:没有真正的规则如何和什么时候将邮件视为垃圾邮件,而上述teqniques只能证明可以在实践中工作,但绝对不保证。每个邮件提供商都可以做他想做的事情(雅虎是做自己的事情的候选人之一,过去烦恼大家)

PS: there are not really rules how and when to regard a mail as spam and the teqniques above have only proven to work in praxis but there is absolutely no guarantee. Every mail provider can do what he wants... (yahoo was one of theese candidates to do their very own thing and to annoy everybody with it in the past)

运气

这篇关于php邮件功能:通过gmail和hotmail标记为垃圾邮件的合法邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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