My emails are going to Gmail Spam. Droplet created Using LAMP on Ubuntu 14.04 Application. Postfix email.

  • Posted June 17, 2014


I created a droplet using the LAMP on Ubuntu 14.04 Application. And apt-get installed postfix and mailutil. Any time I send an email to Gmail it goes to the spam folder.

My Zone file is as follows: <pre> $TTL 1800 @ IN SOA NS1.DIGITALOCEAN.COM. ( 1402857717 ; last update: 2014-06-15 18:41:57 UTC 3600 ; refresh 900 ; retry 1209600 ; expire 1800 ; ttl ) IN NS NS1.DIGITALOCEAN.COM. NS NS2.DIGITALOCEAN.COM. NS NS3.DIGITALOCEAN.COM. MX 10 *.api CNAME *.www CNAME @ IN A www IN A api IN A @ TXT “v=spf1 ip4: ~all” mail IN A *.mail CNAME </pre>

And the received email is as follows: <pre> Delivered-To: Received: by with SMTP id i7csp184731vca; Tue, 17 Jun 2014 02:28:48 -0700 (PDT) X-Received: by with SMTP id ew15mr35734652wjd.19.1402997327993; Tue, 17 Jun 2014 02:28:47 -0700 (PDT) Return-Path: Received: from ( []) by with ESMTP id b2si11777622wik.18.2014. for; Tue, 17 Jun 2014 02:28:47 -0700 (PDT) Received-SPF: pass ( domain of designates as permitted sender) client-ip=; Authentication-Results:; spf=pass ( domain of designates as permitted sender) Received: by (Postfix, from userid 1000) id EB8C9201AF; Tue, 17 Jun 2014 05:28:46 -0400 (EDT) Subject: morn test 2 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: Date: Tue, 17 Jun 2014 05:28:46 -0400 (EDT) From:

test morn 2


I’ve tried editing the SPF1 record and MX record. I’ve renamed the droplet to I’m not sure why it’s still failing and what I can try next?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

My mistake - DKIM is set by Google.

I added opendkim but it didn’t make a difference. Emails are still flagged as spam.

I signed up to Zoho and it works which is great. But I’d still like to figure out how to get emails working without having to use a third party.

Thanks jt,

I doubt that will make a difference as it’s not set when mail is sent from Gmail but I’ll give it a try.

Setup DKIM. It will help authenticate your emails but still isn’t a guarantee that Google will mark them as spam.

Email is a hair pulling game and a lot of people decide to use third party options like Google Apps,, or