3

I have set up a POSTFIX server on my VPS and mail sent trough it is going to Spam in gmail. Here is my message:

Delivered-To: sgenov@gmail.com
Received: by 10.140.43.75 with SMTP id d69csp350632qga;
        Mon, 19 Jan 2015 15:29:29 -0800 (PST)
X-Received: by 10.194.89.39 with SMTP id bl7mr6149887wjb.76.1421710169272;
        Mon, 19 Jan 2015 15:29:29 -0800 (PST)
Return-Path: <kalina@hotelfors-bg.com>
Received: from mail.sgenov.com (mail.sgenov.com. [192.81.221.174])
        by mx.google.com with ESMTP id j9si29338582wjy.109.2015.01.19.15.29.28
        for <sgenov@gmail.com>;
        Mon, 19 Jan 2015 15:29:29 -0800 (PST)
Received-SPF: pass (google.com: domain of kalina@hotelfors-bg.com designates 192.81.221.174 as permitted sender) client-ip=192.81.221.174;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of kalina@hotelfors-bg.com designates 192.81.221.174 as permitted sender) smtp.mail=kalina@hotelfors-bg.com;
       dkim=pass header.i=@hotelfors-bg.com
Received: by mail.sgenov.com (Postfix, from userid 33)
    id 665FB44097; Tue, 20 Jan 2015 01:29:28 +0200 (EET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hotelfors-bg.com;
    s=default; t=1421710168;
    bh=ZOL1SsCcV0ncUnB8HJhFqzY/7ZocyZVCh5HCRSTXejY=;
    h=To:Subject:Date:From;
    b=TjCDSt9mOFyoXVGu4CI7xqPxR7iHMtzeL1Nykd+t0cZBlWEH15OQQVdkDR07G4xJH
     WvKPQAFBHPVynQNYbnsRnwf4A57elvUImo77MDLZGhNGrS70fYdIjEjKAWe8BLX61G
     1GuaBLPfJYYUz6SdVjYsBPNm/io2wrWc63Sdvb1M=
To: <sgenov@gmail.com>
Subject: Hello, Stanimir
X-PHP-Originating-Script: 0:main.inc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Tue, 20 Jan 2015 01:29:28 +0200
From: kalina@hotelfors-bg.com
Message-ID: <f5944a29798c926bf52fda46c4197c76@hotelfors-bg.com>
X-Sender: kalina@hotelfors-bg.com
User-Agent: Roundcube Webmail/0.7.2

This is my new email. Please add it to contacts and reach me if you 
need anything.

Best Regards

As you can see, my mail server is set up with the following:

  • The server has DKIM
  • The server has a verified signed certificate
  • SPF(TXT) is set correctly
  • The server's PTR (reverse DNS) points correctly to my mail server
  • All possible checking tools give a maximum result for the server (it should be trusted by everyone)

Yet, gmail sends all messages from all domains to spam. Does anyone know what the reason could be or what steps I should take? Can I contact someone?

Thanks in advance.

DreamWave
  • 149

1 Answers1

5

Not sure the solution below is an option for you but it works for me as I had a similar issue. I am using a transport map to selectively choose mails with @gmail.com as destination address and relay them via smtp.gmail.com using my G-Mail credentials for authentication.

Here are the steps:

Add the entry below to /etc/postfix/transport

gmail.com smtp:[smtp.gmail.com]

Add an entry below to /etc/postfix/sasl_passwd

[smtp.gmail.com]:587            sgenov@gmail.com:<your_gmail_password_here>

Add the following entries to /etc/postfix/main.cf

transport_maps = hash:/etc/postfix/transport
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtp_use_tls = yes

sudo chmod 400 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/transport
Arul Selvan
  • 1,488