我從我的導軌應用程序發送郵件,但由於某種原因,我從來沒有得到SPF通過,它總是說失敗或中立。如何讓我的發件人策略框架(SPF)通過?
我有前進和反向DNS設置(我認爲是正確的)。我遵循指南here無濟於事。好消息是我的郵件不會以垃圾郵件結束,但這對我來說還不夠,我希望SPF能夠通過。如果任何人都可以幫助我,將不勝感激。
我將我的主機名設置爲mail.example.com
。我有我的反向DNS設置爲相同。但是,當我發送郵件時,我希望它來自[email protected],而不是來自[email protected]。當我從[email protected]發送電子郵件時,我得到一箇中立的SPF,但是當我將其更改爲[email protected]時,它失敗。我的理解是,如果它仍然來自FQDN,它應該通過,但它不會。
這是我的DNS記錄:
A = mail xxx.xxx.xxx.xxx
A = example. xxx.xxx.xxx.xxx
A = www xxx.xxx.xxx.xxx
MX = example. mailstore1.secureserver.net.
MX = example. smtp.secureserver.net.
MX = example. mail.example.com.
TXT = v=spf1 mx include:mail.example.com -all.
第2個MX記錄是從GoDaddy的,但我託管與slicehost網站。另外,我還有一些CNAME和NS記錄,我認爲這些記錄不會有幫助,但我會提及它們的情況。
我使用Ubuntu的後綴和軌道3
任何想法?
UPDATE: 這是我失敗的郵件的一個的頭部
Delivered-To: [email protected]
Received: by 10.229.49.65 with SMTP id u1cs60507qcf;
Mon, 12 Dec 2011 19:20:11 -0800 (PST)
Received: by 10.42.150.135 with SMTP id a7mr13973149icw.53.1323746409644;
Mon, 12 Dec 2011 19:20:09 -0800 (PST)
Return-Path: <[email protected]>
Received: from mail.example.com ([xxx.xxx.xxx.xxx])
by mx.google.com with ESMTP id y15si2866827ibk.138.2011.12.12.19.20.09;
Mon, 12 Dec 2011 19:20:09 -0800 (PST)
Received-SPF: fail (google.com: domain of [email protected] does not designate xxx.xxx.xxx.xxx as permitted sender) client-ip=xxx.xxx.xxx.xxx;
Authentication-Results: mx.google.com; spf=hardfail (google.com: domain of [email protected] does not designate xxx.xxx.xxx.xxx as permitted sender) [email protected]
Received: from localhost.localdomain (localhost [127.0.0.1])
by mail.example.com (Postfix) with ESMTP id B6BB31C1F5D
for <[email protected]>; Tue, 13 Dec 2011 03:20:08 +0000 (UTC)
Date: Tue, 13 Dec 2011 03:20:08 +0000
From: Example <[email protected]>
To: [email protected]
Message-ID: <[email protected]>
Subject: Password Reset
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
解決方案:周圍的SPF記錄 把雙引號,我的現在看起來是這樣的:
TXT = "v=spf1 mx include:mail.example.com -all"
什麼是您附加SPF記錄的域名? mail.example.com或example.com? – 2011-12-14 18:59:59
其爲mydomain.com設置的TXT記錄。 – GiH 2011-12-14 19:02:29