简体   繁体   English

如何降低电子邮件的垃圾邮件分数?

[英]How can I lower the spam score of my email message?

I am sending a new logon and password to a user, however when I do on a test version of our site on the internet the Spam score is 4.6 by spam assassin. 我正在向用户发送新的登录名和密码,但是当我在互联网上测试我们网站的测试版时,垃圾邮件刺客的垃圾邮件分数为4.6。 Which means it gets trapped. 这意味着它被困。

The Email is HTML (so the marketing dept have their nice fonts and colours) with a linked image. 电子邮件是HTML(因此营销部门有他们漂亮的字体和颜色)和链接图像。

The MailMessage() object does not appear to give me a lot of control over the output format of the message. MailMessage()对象似乎没有给我很多控制消息的输出格式。

What measures could I take to lower the spam score? 我可以采取哪些措施来降低垃圾邮件分数?

I am sending using this: 我发送使用这个:

/* send an email */
MailMessage msg = new MailMessage();
msg.IsBodyHtml = true;
//msg.BodyEncoding = Encoding.UTF8;
msg.To.Add(new MailAddress(sToEmail));
msg.From = new MailAddress(sFromEmail);
msg.Subject = sEmailSubject;
msg.Body = sEmailTemplate;
try
{
    client.Send(msg);
}

The spam score is this: 垃圾邮件分数如下:

X-Spam-Score: 4.6 (++++)
X-Spam-Report: Spam detection software report (4.6 points):
    pts rule name              description
    ---- ---------------------- --------------------------------------------------
    1.8 HTML_IMAGE_ONLY_20     BODY: HTML: images with 1600-2000 bytes of words
    0.0 HTML_MESSAGE           BODY: HTML included in message
    1.7 MIME_HTML_ONLY         BODY: Message only has text/html MIME parts
    1.1 HTML_MIME_NO_HTML_TAG  HTML-only message, but there is no HTML tag
    0.1 RDNS_NONE              Delivered to trusted network by a host with no rDNS

Two solutions: 两种解决方案

  1. Add more content, so that the <img> is not the main part of the email - loads more content in clean text without tags. 添加更多内容,以便<img>不是电子邮件的主要部分 - 在没有标签的情况下以干净的文本加载更多内容。 (I know it looks lame, but copyright notices, unsubscribe instructions and registration rules make a really good text padding) Add a text-only version in a new mime part. (我知道它看起来很蹩脚,但版权声明,取消订阅说明和注册规则可以做出非常好的文本填充)在新的mime部分添加纯文本版本。 Send a properly constructed HTML which actually contains the <html> tag. 发送一个实际包含<html>标记的正确构造的HTML。

  2. Smack marketing people with a clue-by-four many times and send text emails in text only - as $DEITY intended. Smack通过四次线索营销人员并仅以文本形式发送文本电子邮件 - 正如$ DEITY所预期的那样。

Using the AlternateView class, you can specify a text/plain body and provide an alternate html body for the marketing boys. 使用AlternateView类,您可以指定文本/纯文本体并为营销男孩提供备用html体。 Even if the text part only says that you should have an html enable reader, the spam filter will drop 1.8 points. 即使文本部分只说你应该有一个html启用阅读器,垃圾邮件过滤器也会下降1.8点。

Then if you start the HTML message with a proper tag (just take a full html page), you will drop 2.8 poins. 然后,如果您使用正确的标记启动HTML消息(只需要一个完整的html页面),您将丢弃2.8个poins。

You can also include LinkedResource s so you can send the image without showing attachments, much nicer. 您还可以包含LinkedResource,这样您就可以发送图像而不显示附件,更好。

It's already telling you what to do, but I'll spell it out for you: 它已经告诉你该怎么做了,但我会为你拼出来:

  1. Include more text or less images. 包含更多文字或更少图片。
  2. Nothing you can do here if you want HTML. 如果你想要HTML,你在这里无能为力。 It's not weighted on the default SpamAssassin install anyway, though. 但是,无论如何,它都没有加权默认的SpamAssassin安装。
  3. Add in a text version of the content in addition to the HTML version. 除HTML版本外,还添加内容的文本版本。
  4. Add in the missing <html> tag 添加缺少的<html>标记
  5. Set up reverse DNS for your outgoing mail server's IP. 为外发邮件服务器的IP设置反向DNS。

Steps 3 and 4 are probably the most important to do. 第3步和第4步可能是最重要的事情。 1 is out of your control (marketing is in control of that). 1是你无法控制的(营销是控制的)。 5 would help, but it's rated fairly low. 5会有所帮助,但它的评分相当低。

It seems like it doesn't matter how you send the message that effects the spam score, but what the message contains. 似乎您如何发送影响垃圾邮件分数的邮件,但邮件包含的内容无关紧要。

Try different versions of the message contents and see what else can change. 尝试不同版本的邮件内容,看看还有什么可以改变。

1.8 points seems to be from the images. 1.8点似乎来自图像。 Take out the images. 取出图像。

How are you creating the HTML? 你是如何创建HTML的? I would look at all those factors before I would look at changing how the message is sent, because that is not a factor in spam. 在考虑更改邮件的发送方式之前,我会考虑所有这些因素,因为这不是垃圾邮件的一个因素。

1.1 HTML_MIME_NO_HTML_TAG HTML-only message, but there is no HTML tag

Well for one, you need an HTML tag around your HTML message. 好吧,你需要一个围绕HTML消息的HTML标签。 If you make your HTML validate, it seems like it'd lower the score a bit. 如果你对HTML进行验证,它似乎会降低分数。 That'd knock you down to 3.5 points. 这会让你跌到3.5分。

Don't forget a nice friendly name in your from address too, that's making our emails get caught up in filters. 不要忘记在你的地址中有一个友好的友好名字,这会使我们的电子邮件陷入过滤器。

email from: J Random Hacker <jrandomhacker@example.com> 电子邮件来自: J Random Hacker <jrandomhacker@example.com>

is better than jrandomhacker@example.com jrandomhacker@example.com

If you've simply got an html link to a picture, then it looks like spam, and people who's email clients block images by default (most online ones do) won't be able to see your message. 如果您只是获得了一张图片的html链接,那么它看起来像垃圾邮件,默认情况下电子邮件客户端阻止图片的人(大多数在线图片的用户)将无法看到您的邮件。

Rather than have one big image, try breaking it up and use html tables to lay it out. 而不是拥有一个大图像,尝试分解并使用html表格来解决它。 Also, make sure you set the alt attribute on the img tags. 另外,请确保在img标记上设置alt属性。

The other thing, apart from the spam assasin score, to look at, is making sure you've set up Sender Policy Framework for the domain from which you're sending the emails. 另外,除了垃圾邮件刺客评分之外,还要确保您为要发送电子邮件的域设置发件人策略框架 Some online email providers do not score spam on content at all, rather they use SPF and user's "reporting spam", so make sure you get this set up and working correctly before you do large broadcasts. 一些在线电子邮件提供商根本不对内容上的垃圾邮件进行评分,而是使用SPF和用户的“报告垃圾邮件”,因此请确保在进行大型广播之前进行此设置并正常工作。

You might also choose to use a service such as the excellent campaign monitor instead of writing your own broadcast client. 您也可以选择使用优秀的广告系列监视器等服务,而不是编写自己的广播客户端。 They can guide you through the process of setting up the DNS entries required for SPF, and also provide tracking of people opening the email and following links within the email. 他们可以指导您完成设置SPF所需的DNS条目的过程,还可以跟踪打开电子邮件的人员以及电子邮件中的以下链接。

You are answering your own question. 你在回答自己的问题。 By not sending "images with 1600-2000 bytes of words", "HTML included in message", "Message only has text/html MIME parts" or "HTML-only message, but there is no HTML tag" you will substract spam points from the formula and hence the result will be lower. 通过不发送“带有1600-2000字节单词的图像”,“消息中包含HTML”,“消息只有text / html MIME部分”或“仅HTML消息,但没有HTML标记”,您将减去垃圾点数从公式来看,结果会更低。

An (inferior) alternative is to ask the user to whitelist you. (劣等)替代方案是要求用户将您列入白名单。

I don't know much about Spam Assasin, but I've used Return Path in the past. 我对Spam Assasin了解不多,但我过去曾使用Return Path They give a rather comprehensive view of the aspects of an email that make it look like spam. 他们对电子邮件的各个方面进行了相当全面的了解,使其看起来像垃圾邮件。

I don't work for Return Path, btw :) 我不适用于Return Path,顺便说一句:)

Nothing you can do here if you want HTML. 如果你想要HTML,你在这里无能为力。 It's not weighted on the default SpamAssassin install anyway, though. 但是,无论如何,它都没有加权默认的SpamAssassin安装。 Add in a text version of the content in addition to the HTML version. 除HTML版本外,还添加内容的文本版本。 Add in the missing tag 添加缺少的标记

alter sol to above : Do HTML encode base64 method , not expose html headers in content can significant reduce level of spam score via filters. 将sol改为上面:HTML编码base64方法,不公开内容中的html标题可以通过过滤器显着降低垃圾邮件分数水平。 :) :)

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

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