This question already has an answer here:

I'm in troubles with postfix, hostname and google spam.

I have a virtual server, that hosts a few domains. Each domain has mail, lets, say info@thatdomain.com. One of those domains, lets say special.com, has MX record with mail.special.com and roundcube is set up to use this mail.special.com smtp.

When I send mail from each mailbox (via roundcube) it's ok, all the mail will be delivered, but google marks them as spam and put them into Spam folder.

I've tried to look aroud a bit and I've found that it may be caused by wrong /etc/hosts or machine hostname or myhostname in postfix main.cf

Info I can provide:

Current machine hostname


Current myhostname in main.cf


Part from recieved mail that is in spam folder (interesting)

Received-SPF: neutral (google.com: SERVER_IP_ADDRESS is neither permitted nor denied by best guess record for domain of info@thatdomain.com) client-ip=SERVER_IP_ADDRESS;
Authentication-Results: mx.google.com;
   spf=neutral (google.com: SERVER_IP_ADDRESS is neither permitted nor denied by best guess record for domain of info@thatdomain.com) smtp.mail=info@thatdomain.com
Received: from vps (vps [SERVER_IP_ADDRESS])
by vps (Postfix) with ESMTP id 26E2D122371C
for <myemail@gmail.com>; Wed, 10 Jul 2013 17:00:57 +0200 (CEST)

thatdomain.com (not special.com) SPF record value

"v=spf1 include:_spf.google.com ~all"

I think there is something really wrong, but I dont know what is that.

Can u guys please help me out?

Thanks in advance.

marked as duplicate by Jenny D, Tom O'Connor Jul 11 '13 at 11:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Shouldn't your hostname be an FQDN? – NickW Jul 10 '13 at 16:14
  • The hostname should be a FQDN. And, what does the IP resolve back to? If it resolved to something (has a PTR record), it needs to match the forward lookup. – Halfgaar Jul 10 '13 at 16:56
  • I've changed myhostname in main.cf to mail.special.com. Now HELO works. How can I permanently change the hostname to specia.com? The IP address resolves to nothing. Where I can set up this? On the server (bind), or in domain admin page?. Thanks a lot. – n1_ Jul 10 '13 at 17:38

The solution was reverse DNS record for special.com. It's essential for mail server to be accepted by most spam filters. GMail doesn't punt my messages into spam box anymore.

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