电子邮件最终是垃圾邮件,但仅限于从实时网站发送。 Localhost有效

时间:2014-12-04 08:23:34

标签: c# .net email smtp smtpclient

我正在使用第三方SMTP服务 - turboSMTP

我在发送来自localhost(测试时)和实时网站的电子邮件时使用它,并且两者都有效。但是,直播网站发送的电子邮件始终被标记为垃圾邮件,而来自localhost的电子邮件未被标记为垃圾邮件

即使发件人电子邮件是相同的。内容是一样的。标题是相同的等等。

当我通过与我的虚拟主机无关的第三方SMTP服务发送时,它是否真的看到我从实时网站或本地主机发送?

我的代码剪切:

SmtpClient smtpClient = new SmtpClient();
System.Net.Mail.MailMessage mailMessage = new System.Net.Mail.MailMessage();
mailMessage.From = new MailAddress(sender);
mailMessage.To.Add(recipient);
mailMessage.Subject = title;
mailMessage.Body = message;
mailMessage.IsBodyHtml = false;

smtpClient.Host = "smtpAddress";
smtpClient.UseDefaultCredentials = false;
smtpClient.EnableSsl = false;
smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
smtpClient.Port = 587;
smtpClient.Credentials = new NetworkCredential("username", "password");

smtpClient.Send(mailMessage);

被标记为垃圾邮件的电子邮件(从实时网站发送)

Delivered-To: censoredAddress@gmail.com
Received: by 10.107.132.3 with SMTP id g3csp14274iod;
        Thu, 4 Dec 2014 00:02:36 -0800 (PST)
X-Received: by 10.202.225.197 with SMTP id y188mr5614041oig.94.1417680156083;
        Thu, 04 Dec 2014 00:02:36 -0800 (PST)
Return-Path: <noreply@censoredDomain.se>
Received: from tbjjbihbhcbji.turbo-smtp.net (tbjjbihbhcbji.turbo-smtp.net. [199.187.172.198])
        by mx.google.com with SMTP id x10si17295964oek.84.2014.12.04.00.02.35
        for <censoredAddress@gmail.com>;
        Thu, 04 Dec 2014 00:02:36 -0800 (PST)
Received-SPF: fail (google.com: domain of noreply@censoredDomain.se does not designate 199.187.172.198 as permitted sender) client-ip=199.187.172.198;
Authentication-Results: mx.google.com;
       spf=fail (google.com: domain of noreply@censoredDomain.se does not designate 199.187.172.198 as permitted sender) smtp.mail=noreply@censoredDomain.se;
       dkim=temperror (no key for signature) header.i=@
Message-Id: <5480151c.8a283c0a.71e4.678eSMTPIN_ADDED_MISSING@mx.google.com>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
    d=censoredDomain.se; s=turbo-smtp; x=1418284956; h=DomainKey-Signature:
    Received:Received:MIME-Version:From:To:Date:Subject:Content-Type:
    Content-Transfer-Encoding; bh=7vEAgi0RRzjrn+4Le/fcS1k1+tJ/Ro6XDU
    4TKOlZ0JY=; b=Yu5q4UjDuGv2L/Fa3MR+FO4+h3jWj5KHKvDGZFCyJYj0+aB7aV
    kgOix5W5zrlaJ0rbl39Ck08AORmO82jdcXzFdtFm5lst6ENG3JaWorxWyxduqWBI
    TY7ZSzs9HJb4TBXcMQvvaPdM96VA7FP3i4vb4Q9mkoGX1nD6c9asLirsE=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
    s=turbo-smtp; d=censoredDomain.se;
    h=Received:Received:X-TurboSMTP-Tracking:MIME-Version:From:To:Date:Subject:Content-Type:Content-Transfer-Encoding;
    b=ttGj0ZR2T0aPVS+Q+0oEdy5VM4wWzIBm2DtLYvtUFyHhldqWO5n2kVnZN3m1pR
    w0gGFX/r67i9FblNhg04ELxvsfO2+mHg0bhyTJgYOAPjS0DjoMBZI1WD2w/CTObN
    VMxSkTu8Hq8CDe49SRsduLnVLUdg2zwt86eNxItLLTno0=;
Received: (qmail 1442 invoked from network); 4 Dec 2014 08:02:34 -0000
Received: from unknown (HELO Irwindale) (authenticated@212.247.113.26)  by turbo-smtp.com with SMTP; 4 Dec 2014 08:02:34 -0000
X-TurboSMTP-Tracking: 1692405204
MIME-Version: 1.0
From: noreply@censoredDomain.se
To: censoredAddress@gmail.com
Date: 4 Dec 2014 09:02:34 +0100
Subject: Testar igen
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

asdasdasd

的电子邮件被标记为垃圾邮件(从localhost发送)

Delivered-To: censoredAddress@gmail.com
Received: by 10.107.132.3 with SMTP id g3csp14413iod;
        Thu, 4 Dec 2014 00:03:46 -0800 (PST)
X-Received: by 10.60.150.194 with SMTP id uk2mr5861322oeb.37.1417680226570;
        Thu, 04 Dec 2014 00:03:46 -0800 (PST)
Return-Path: <noreply@censoredDomain.se>
Received: from tbjjbihbhcbji.turbo-smtp.net (tbjjbihbhcbji.turbo-smtp.net. [199.187.172.198])
        by mx.google.com with SMTP id a140si17357087oib.49.2014.12.04.00.03.45
        for <censoredAddress@gmail.com>;
        Thu, 04 Dec 2014 00:03:45 -0800 (PST)
Received-SPF: fail (google.com: domain of noreply@censoredDomain.se does not designate 199.187.172.198 as permitted sender) client-ip=199.187.172.198;
Authentication-Results: mx.google.com;
       spf=fail (google.com: domain of noreply@censoredDomain.se does not designate 199.187.172.198 as permitted sender) smtp.mail=noreply@censoredDomain.se;
       dkim=temperror (no key for signature) header.i=@
Message-Id: <54801561.924dca0a.a7bc.ffffe533SMTPIN_ADDED_MISSING@mx.google.com>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
    d=censoredDomain.se; s=turbo-smtp; x=1418285025; h=DomainKey-Signature:
    Received:Received:MIME-Version:From:To:Date:Subject:Content-Type:
    Content-Transfer-Encoding; bh=7vEAgi0RRzjrn+4Le/fcS1k1+tJ/Ro6XDU
    4TKOlZ0JY=; b=rW/7YJz7bCAsSz8EF2NTfU+JbIsh5A4QLAQ5EgrxJUG3j1vJmt
    8aVAMEI+45iC79T/vFpfLrN1e+fuSXCXuiw9MhTgBvHG0w0JIiKpufyHUnIRmNUs
    YjNRErfIhaHwtEgAFXL/0ou0sG7QrG2cKu8VP/P2WA7opvoC6tfgIQH6k=
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
    s=turbo-smtp; d=censoredDomain.se;
    h=Received:Received:X-TurboSMTP-Tracking:MIME-Version:From:To:Date:Subject:Content-Type:Content-Transfer-Encoding;
    b=o5Vxv9MAQeyFm1EqkQ3f56XVgxzSOR2HNB7oqg6GqxP4qPy8QY9hBu2w5DPdf3
    8d/HQqJX61zN4Rfnyxgrw2PMPXr5dsrpKnKyB3o1/FsGCLH3meLyO+LYxeQBLRFO
    kKtUtQ4vvSy2TN+7Sefe18lQo+E6bUunTcg64kw2I//4E=;
Received: (qmail 11732 invoked from network); 4 Dec 2014 08:03:45 -0000
Received: from unknown (HELO Codecomp-HP) (authenticated@78.70.27.139)  by turbo-smtp.com with SMTP; 4 Dec 2014 08:03:45 -0000
X-TurboSMTP-Tracking: 1692407529
MIME-Version: 1.0
From: noreply@censoredDomain.se
To: censoredAddress@gmail.com
Date: 4 Dec 2014 09:03:39 +0100
Subject: Testar igen
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

asdasdasd

1 个答案:

答案 0 :(得分:1)

您的邮件中有SPF失败:

  

spf =失败(google.com:域名为noreply@censoredDomain.se并未将199.187.172.198指定为允许的发件人)

尝试将SMTP提供商的IP地址(范围)添加到您的SPF记录中(或将其完全删除)。

你在两封邮件中都失败了,所以我不知道为什么会有人通过,但失败的是由SPF检查引起的。

DKIM签名似乎也不正确:

  

dkim = temperror(没有签名密钥)header.i = @

您应该使用SMTP提供商进行检查。