How to resolve problems with spf / softfail?

Jim Miller asked:

I’m having problems with Google rejecting mail because of SPF problems. I thought I had this fixed, but evidently not…

The mail is being sent from a Drupal site running mimemail. A message that shows the problem looks like:

Received: by with SMTP id g5csp300564lbn;
        Wed, 2 Apr 2014 10:21:06 -0700 (PDT)
X-Received: by with SMTP id yx9mr1407538pac.3.1396459264202;
        Wed, 02 Apr 2014 10:21:04 -0700 (PDT)
Return-Path: <>
Received: from ( [])
        by with ESMTP id m8si1612133pbd.503.2014.
        for <>;
        Wed, 02 Apr 2014 10:21:04 -0700 (PDT)
Received-SPF: softfail ( domain of transitioning does not designate as permitted sender);
       spf=softfail ( domain of transitioning does not designate as permitted sender)
Received: by (Postfix, from userid 48)
    id 3E486101774; Wed,  2 Apr 2014 17:21:02 +0000 (UTC)
To: "reg" <>
Subject: Message Subject here
X-PHP-Originating-Script: 501:mimemail.module
Sender:Sender <>
From:Sender <>
Message-Id: <>
Date: Wed,  2 Apr 2014 17:21:02 +0000 (UTC)

This is a multi-part message in MIME format.


Content-Type:text/plain; charset=utf-8

Message text goes here...

Content-Type:text/html; charset=utf-8

<html text goes here>



[Apologies for the anonomyzing.]

The SPF records for the domain, obtained from, look like:

v=spf1 ~all , ttl : 14144
v=spf1 ~all , ttl : 14144
v=spf1 a -all , ttl : 14144
v=spf1 ~all , ttl : 14144

similarly anonymized.

I can’t figure out what’s wrong — the appropriate SPF records seem to be in place. The only issue I can see is that I have indeed set up (or tried to set up) two servers as legal senders for the domain; this is meant to cover both a production and a development server (let’s call them and Is this an issue?

Any thoughts about what’s wrong? Again, I thought this was once working correctly, but it’s definitely not now. Thanks!

My answer:

You can only have one SPF record. Since you created four of them, which one actually gets used is essentially random. You should combine them together into a single record.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.