Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6939673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:39:08+00:00 2026-05-27T12:39:08+00:00

I’m sending mails from my rails application but for some reason I never get

  • 0

I’m sending mails from my rails application but for some reason I never get SPF to pass, its always saying either failed or neutral.

I’ve got forward and reverse DNS set up (what I think is correct). I followed the guides here to no avail. The good thing is that my mail doesn’t end up in spam, but thats not enough for me, I want SPF to pass. If anyone can help me it would be appreciated.

I have my hostname set to mail.example.com. I have my reverse DNS set to the same. However, when I send mail I want it to come from help@example.com, not from help@mail.example.com. When I email from help@mail.example.com I get a neutral SPF, but when i change it to help@example.com, it fails. The way I understand is that if its still coming from the FQDN it should pass, but it doesn’t.

These are my DNS records:

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.

The first 2 MX records are from godaddy, but I’m hosting the site with slicehost. Also, I have a couple of CNAME and NS records that I don’t think are helpful but Im mentioning in case they are.

I’m using postfix on Ubuntu and rails 3.

Any ideas?

UPDATE:
Here is the header of one of my failed mails

Delivered-To: myemail@gmail.com
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: <help@example.com>
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 help@example.com 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 help@example.com does not designate xxx.xxx.xxx.xxx as permitted sender) smtp.mail=help@example.com
Received: from localhost.localdomain (localhost [127.0.0.1])
    by mail.example.com (Postfix) with ESMTP id B6BB31C1F5D
    for <myemail@gmail.com>; Tue, 13 Dec 2011 03:20:08 +0000 (UTC)
Date: Tue, 13 Dec 2011 03:20:08 +0000
From: Example <help@example.com>
To: myemail@gmail.com
Message-ID: <4ee6c468a8150_7e4e4ea930773a1@mail.example.com.mail>
Subject: Password Reset
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

SOLUTION:
Put quotes around the spf record, mine now looks like this:

TXT = "v=spf1 mx include:mail.example.com -all"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:39:08+00:00Added an answer on May 27, 2026 at 12:39 pm

    Summary based on the comments:
    The quotes are important in the content of a TXT record. Space counts as a separator. I have met a DNS user interface where sloppily entering v=spf1 -all (note that quotes are missing) resulted in two atoms “v=spf1” “-all” instead of a single atom “v=spf1 -all”. Only the latter will work.

    Your SPF record is messed up. “include” is a redirection. You are saying that the SPF record of example.com is the SPF record of mail.example.com, and based on your question I guess this is not what you want. You should include all relevant DNS information (MX, A, TXT, SPF) in your question. Something like:

    example.com.  IN TXT "v=spf1 include:example.net -all"
    example.net.  IN TXT "v=spf1 mx -all"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a bunch of posts stored in text files formatted in yaml/textile (from
We're building an app, our first using Rails 3, and we're having to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.