Postfix emails detected as spam with gmail [duplicate]

I know that there are a few posts about this and I have been reading them for a while now but still, I can't resolve my issue.

I’m running ISPconfig with postfix and I can’t figure out why my outgoing emails are marked as spam in gmail and outlook.com.

  • Reverse DNS is fine
  • I set up SPF DKIM and DMARC (when I look in headers for a gmail email it says pass, same for outlook)
  • I’m not blacklisted
  • Mxtoolbox check is ok (it returns only too warning related to SOA expire value and Name server on same network)
  • HELO is returning the proper name
  • I tried different content in the email / plain text etc …
  • I changed headers to display the right hostname instead of localhost
  • I tried to use a different IP
  • I’m not using the server to send bulk emails.

Here is the result when I send a mail to [email protected].

==========================================================
Summary of Results
==========================================================
SPF check:          pass
DomainKeys check:   neutral
DKIM check:         pass
Sender-ID check:    pass
SpamAssassin check: ham

Here is the content of an email to gmail :

Delivered-To: [email protected]
Received: by 10.37.115.87 with SMTP id o84csp2701146ybc;
        Wed, 14 Oct 2015 02:24:12 -0700 (PDT)
X-Received: by 10.180.23.231 with SMTP id p7mr27203112wif.30.1444814652908;
        Wed, 14 Oct 2015 02:24:12 -0700 (PDT)
Return-Path: <[email protected]>
Received: from xxx.xxx.fr (xxx.xxx.fr. [xxx.xxx.xxx.xxx])
        by mx.google.com with ESMTPS id ao6si9344594wjc.158.2015.10.14.02.24.12
        for <[email protected]>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 14 Oct 2015 02:24:12 -0700 (PDT)
Received-SPF: pass (google.com: domain of [email protected] designates xxx.xxx.xxx.xxx as permitted sender) client-ip=xxx.xxx.xxx.xxx;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of [email protected] designates xxx.xxx.xxx.xxx as permitted sender) [email protected];
       dkim=pass [email protected];
       dmarc=pass (p=QUARANTINE dis=NONE) header.from=xxx.fr
Received: from mail.xxx.fr (mail.xxx.fr [127.0.0.1])
    by mail.xxx.fr (Postfix) with ESMTP id 761538392E
    for <[email protected]>; Wed, 14 Oct 2015 11:24:12 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xxx.fr; h=
    user-agent:message-id:from:from:date:date
    :content-transfer-encoding:content-type:content-type
    :mime-version:subject:subject; s=default; t=1444814652; x=
    1446629053; bh=ZRVRT3UM6A3vr5Bjs0V90xDPq6+kbcb9HUlVjWHZ8Vc=; b=Y
    pcDBU5OXZZsskSavKUNkbU8+TApXPx98+fJCXc4/5UkEXuLa7fNT/8HWidm0m8y2
    chyd8e03x3u7keKwLXdKQz4SOoo1baIdB55DwY0tNebusGegoxnARAoVk1RoqO1E
    e4FlvW5FkG4CNlPrFDEa0FKvURIDy+5g/dpS89k6UY=
X-Virus-Scanned: Debian amavisd-new at mail.xxx.fr
Received: by mail.xxx.fr (Postfix, from userid 33)
    id 525068392A; Wed, 14 Oct 2015 11:24:12 +0200 (CEST)
To: <[email protected]>
Subject: Envoi depuis webmail
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: Wed, 14 Oct 2015 11:24:12 +0200
From: Damien Lxxxxxxx <[email protected]>
Message-ID: <[email protected]>
X-Sender: [email protected]
User-Agent: Roundcube Webmail/0.7.2

Bonjour,

Merci de me recontacter.

Do you have any idea what’s wrong with my setup?

Thank you.


After a few days of research I manage to get it working.

I added another IP failover (different IP range) on my server and it now works.

I think google has its own blacklist and the previous owner of my IP was probably sending spam. When they say it's content related it's not true because i'm sending the exact same email with wrong SPF and wrong reverse and it goes through so it is totally IP related.