Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

New Mac OS X Server setup, when i send mail to gmail it goes straight to Spam. Why is that?

My setup: DNS - done (A records PTR are ok) Mail Setup - done Webmail - done

Also there seems to be a naming problem. They all come from instead of I must be missing an alias somewhere.

I've read an entire book on setting this up so don't throw stones :) The GUI is masking a lot of this up for me, so explanations via GUI are appreciated.

The headers look like this:


Received: by with SMTP id z19cs476033wfh;

    Mon, 3 Jan 2011 01:37:09 -0800 (PST)

Received: by with SMTP id f16mr8853543bki.61.1294047428115;

    Mon, 03 Jan 2011 01:37:08 -0800 (PST)


Received: from ([94.x.x.x])

    by with ESMTP id c20si50831332bkc.48.2011.;

    Mon, 03 Jan 2011 01:37:07 -0800 (PST)

Received-SPF: neutral ( 94.x.x.x is neither permitted nor denied by best guess record for domain of client-ip=94.x.x.x;

Authentication-Results:; spf=neutral ( 94.x.x.x is neither permitted nor denied by best guess record for domain of

Received: from localhost (localhost [])

by (Postfix) with ESMTP id 0A19F60508;

Mon,  3 Jan 2011 11:37:07 +0200 (EET)

X-Virus-Scanned: amavisd-new at

Received: from ([])

by localhost ( []) (amavisd-new, port 10024)

with ESMTP id mNgNTNwNhyP1; Mon,  3 Jan 2011 11:37:06 +0200 (EET)

Received: from (localhost [])

by (Postfix) with ESMTP id 57E69604F1;

Mon,  3 Jan 2011 11:37:06 +0200 (EET)

Received: from

    (SquirrelMail authenticated user USER)

    by with HTTP;

    Mon, 3 Jan 2011 11:37:06 +0200


Date: Mon, 3 Jan 2011 11:37:06 +0200

Subject: test



User-Agent: SquirrelMail/1.4.20

MIME-Version: 1.0

Content-Type: text/plain;charset=iso-8859-1

Content-Transfer-Encoding: 8bit

X-Priority: 3 (Normal)

Importance: Normal


share|improve this question
Can you provide a sample email, with headers, that is flagged as spam? –  blueben Jan 3 '11 at 11:13
ok... edited the question. –  unmircea Jan 3 '11 at 12:28

4 Answers 4

SPF records and reverse DNS for the mail server IP address will help a lot for getting mail through to Google.

Check out for some helpful mail server IP tests and setup.

share|improve this answer
Where do i add SPF records? –  unmircea Jan 6 '11 at 23:08
Also, "They all come from instead of I must be missing an alias somewhere." Make sure is set up as the domain name and host name in Server Admin under the Mail service, not –  Jack Lawrence Jan 11 '11 at 21:38

As a first guess, you should probably set up the right SPF recors in your DNS for your domain. Currently it seems there are no entries, therefore simply add one allowing only your mail server to send mails for your domain.

share|improve this answer
Is this one any good: v=spf1amx~all. How do i add one? SPF is not mentioned in the server setup book. Is this some kind of standard, because if it is it's not very well documented. –  unmircea Jan 3 '11 at 14:15
Hmm... first time i heard of SPF in my life... My server setup book makes no mention of them. –  unmircea Jan 3 '11 at 15:29

I work for a Google partner, so I may be able to help.

  • Do the emails go to spam for a Live Mail account? (Out of curiosity)
  • Is this to a Google Apps account, or account?
  • Does it happen on other Gmail accounts?

Do your A records contain WWW in them?

Edit: As suggested below, SPF is also very important, I'd assumed you'd have these.

share|improve this answer
In my dns i have an A record with @ pointing my IP, blank record pointing to my IP, then another A record SERVER pointing to my IP again and two or three Aliases CNAME records pointing to SERVER. –  unmircea Jan 3 '11 at 14:04

This question gets asked frequently here - read some of the previous responses. Note there is no magic bullet fix.

share|improve this answer
I understand... i think it's the naming issue. All my emails seem to come from instead of just Can this be fixed? –  unmircea Jan 3 '11 at 13:13

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.