Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a problem with Gmail.

It started after one of our trojan infected PCs sent spam for one day from our IP address.

We've fixed the problem, but we got into 3 black lists. We've fixed that, too. But still every time we send an email to Gmail the message is rejected:

So I've checked Google Bulk Sender's guide once again and found an error in our SPF record and fixed it. Google says everything should become fine after some time, but this doesn't happen. 3 weeks already passed but we still can't send emails to Gmail.

Our MX setup is a bit complex, but not too much: We have a domain name, it has it's own mail (this one is fine, but the problems are with sub-domain name domain has several DNS records for the subdomain:

corp                     A
corp                     MX    20    TXT   "v=spf1 ip4: ~all" 

(I set ~all for testing purposes only, it was -all before that)

These records are for our corporate Exchange 2003 server at Its LAN name is so its HELO/EHLO greetings are also

To pass EHLO check we've also created some records in's DNS:

s2.corp                  A TXT   "v=spf1 ip4: ~all" 

As I understand SPF verifications should be passed in this way: Out server s2 connects to MX of the recepient (Rcp.MX): EHLO Rcp.MX says Ok, and makes SPF check of HELO/EHLO. It does NSlookup for and gets the above DNS-records. TXT records says that should be only from IP So it should be passed.

Then our s2 server says RCPT FROM: Rcp.MX` server checks it, too. The values are the same so they should also be positive.

Maybe there is also a rDNS check, but I'm not sure what is checked HELO or RCPT FROM.

Our PTR record for is: 86400 IN PTR

To me everything looks fine, but anyway all emails are rejected by Gmail.

So, I've checked - it says everything is fine, I passed Python check, I did email test. It's fine, too:

Return-Path: <>
Received: from ( by id ha45na11u9cs for <>; Fri, 2 Mar 2012 13:03:21 -0500 (envelope-from <>)
Authentication-Results:; spf=pass
Authentication-Results:; domainkeys=neutral (message not signed)
Authentication-Results:; dkim=neutral (message not signed)
Authentication-Results:; sender-id=pass
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: multipart/alternative;
Subject: test
Date: Fri, 2 Mar 2012 21:03:15 +0300
X-MimeOLE: Produced By Microsoft Exchange V6.5
Message-ID: <>
Thread-Topic: test
Thread-Index: Acz4jS34oznvbyFQR4S5rXsNQFvTdg==
From: =?koi8-r?B?89XQ0tXOwMsg8MHXxcw=?= <>
To: <>

I also checked with, but it FAILs all the time, no matter which SPF records I make:

< #5.7.1 smtp;550 5.7.1 <>: Recipient address rejected: SPF Tests: Mail-From Result="softfail": Mail From="" HELO name="" HELO Result="softfail" Remote IP="">

I've filled Gmail form twice, but nothing happens.

We do not send spam, only emails for our clients. 2 or 3 times we did mass emails (like New Year Greetings and sales promos) from addresses, but they where all complying to Gmail Bulk Sender's Guide (I mean SPF, Open Relays, Precedence: Bulk and Unsubscribe tags). So, this should be not a problem.

Please, help me. What am I doing wrong?

UPD: I also tried test and the server also fails this test. Here is the result: . Here is one more

I also tried to send email from that server manually via telnet and everything is fine. Here is what I type:

220 ESMTP g15si4811326anb.170
250 at your service
250 2.1.0 OK g15si4811326anb.170
250 2.1.5 OK g15si4811326anb.170
354  Go ahead g15si4811326anb.170
To: Pavel <>
Subject: Test 28

This is telnet test
250 2.0.0 OK 1330795021 g15si4811326anb.170
221 2.0.0 closing connection g15si4811326anb.170

And this is what I get:

Received: by with SMTP id a9csp96864wbt;
        Sat, 3 Mar 2012 09:17:02 -0800 (PST)
Received: by with SMTP id f12mr4837125ann.49.1330795021572;
        Sat, 03 Mar 2012 09:17:01 -0800 (PST)
Return-Path: <>
Received: from ( [])
        by with SMTP id g15si4811326anb.170.2012.;
        Sat, 03 Mar 2012 09:17:00 -0800 (PST)
Received-SPF: pass ( domain of designates as permitted sender) client-ip=;
Authentication-Results:; spf=pass ( domain of designates as permitted sender)
Date: Sat, 03 Mar 2012 09:17:00 -0800 (PST)
Message-Id: <>
To: Pavel <>
Subject: Test 28

This is telnet test
share|improve this question
Have you tried changing the TXT record from ip4: to mx? Like you, I can't see an error, but that may be worth trying. – James O'Gorman Mar 2 '12 at 21:14
Tried mx for corp: < #5.7.1 smtp;550 5.7.1 <>: Recipient address rejected: SPF Tests: Mail-From Result="permerror": Mail From="" HELO name="" HELO Result="softfail" Remote IP=""> – pablomedok Mar 2 '12 at 23:03
And mx for s2.corp. < #5.7.1 smtp;550 5.7.1 <>: Recipient address rejected: SPF Tests: Mail-From Result="softfail": Mail From="" HELO name="" HELO Result="softfail" Remote IP=""> Both are Softfail. – pablomedok Mar 2 '12 at 23:15
Do you have a DSN (Delivery Status Notification) for a bounced message ? Can you post it ? You don't say whether you know for sure that SPF is why Gmail is rejecting your email. – kls Mar 2 '12 at 23:18
I can give it to you, but it's in Russian: Сообщение не было получено одним или несколькими получателями. Тема: test 22 Отправлено: 03.03.2012 0:07 Сообщение не получили следующие получатели: на 03.03.2012 0:08 Ошибка связи с сервером электронной почты получателя по протоколу SMTP. Обратитесь к системному администратору. < #5.5.0 smtp;550-5.7.1 [ 3] Our system has detected an unusual rate of> The message breaks after the first line. I saw the logs, after it there is QUIT – pablomedok Mar 2 '12 at 23:46

Microsoft has a nice wizzard. Maybe it can suggest some changes?

share|improve this answer
Yes, I know it. Thanks – pablomedok Mar 22 '12 at 21:43
up vote 2 down vote accepted

After 50 days of trying and googling for a solution, Gmail started to accept our emails. They pass to inbox in normal way (they are not tagged as spam).

I didn't make any changes or any other tries during last 15 days. I don't know is it bureaucracy or some algorithms that take so long, but to my mind it took 10 time longer than it should. 5 day penalty for our weak security is enough.

By the way, now passes the test, test is still reporting a failure. Looks like my situation is too complex for the test. I would fix my PTR and HELO names to match domain name.

However it took already a week after we asked our ISP to change PTR and it's still remains unchanged... One more bureaucracy issue.

Thanks for everyone's help.

share|improve this answer

could it be because you're using only TXT records, without an SPF type record?

to quote RFC 4408:

It is recognized that the current practice (using a TXT record) is
not optimal, but it is necessary because there are a number of DNS
server and resolver implementations in common use that cannot handle
the new RR type. The two-record-type scheme provides a forward path
to the better solution of using an RR type reserved for this purpose.

An SPF-compliant domain name SHOULD have SPF records of both RR
types. A compliant domain name MUST have a record of at least one
type. If a domain has records of both types, they MUST have
identical content.

share|improve this answer
Our hosting control panel does not support SPF record type (only a, aaaa, cname, ns, mx, srv, txt). But that was not a problem before. I just can't understand, why some services pass and some other fail. And why manual message sending via Telnet was successful from the same server? Looks like there is something wrong with Exchange settings. – pablomedok Mar 4 '12 at 0:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.