postfix outgoing emails go to SPAM in gmail and hotmail

Zenth asked:

I really going in madness, i working during days installing postfix and dovecot, and DKIM, and reconfure my DNS, but my outgoing emails allways go to SPAM inbox.

I try some email checkers, and “all its ok” but emails go to SPAM ever.

Here is the result of verifier-feedback@port25.com:

This message is an automatic response from Port25's authentication verifier
service at verifier.port25.com.  The service allows email senders to perform
a simple check of various sender authentication mechanisms.  It is provided
free of charge, in the hope that it is useful to the email community.  While
it is not officially supported, we welcome any feedback you may have at
<verifier-feedback@port25.com>.

Thank you for using the verifier,

The Port25 Solutions, Inc. team

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

==========================================================
Details:
==========================================================

HELO hostname:  benmaster.es
Source IP:      37.134.112.28
mail-from:      admin@benmaster.es

----------------------------------------------------------
SPF check details:
----------------------------------------------------------
Result:         pass 
ID(s) verified: smtp.mailfrom=admin@benmaster.es
DNS record(s):
    benmaster.es. SPF (no records)
    benmaster.es. 3409 IN TXT "v=spf1 mx a:mail.benmaster.es ip4:195.78.228.0/22 ip4:91.192.108.0/22 ip4:93.93.64.0/21 ip4:5.145.168.0/21 ip6:2a00:1d70::/32 ip4:37.134.112.28 mx:mail.benmaster.es mx:develutils.com -all"
    benmaster.es. 3409 IN MX 10 mail.benmaster.es.
    mail.benmaster.es. 3409 IN A 37.134.112.28

----------------------------------------------------------
DomainKeys check details:
----------------------------------------------------------
Result:         neutral (message not signed)
ID(s) verified: header.From=admin@benmaster.es
DNS record(s):

----------------------------------------------------------
DKIM check details:
----------------------------------------------------------
Result:         pass (matches From: admin@benmaster.es)
ID(s) verified: header.d=benmaster.es
Canonicalized Headers:
    to:check-auth@verifier.port25.com'0D''0A'
    from:Admin'20'<admin@benmaster.es>'0D''0A'
    subject:test'20'title'0D''0A'
    date:Thu,'20'22'20'Oct'20'2015'20'21:07:58'20'+0200'0D''0A'
    dkim-signature:v=1;'20'a=rsa-sha256;'20'c=relaxed/simple;'20'd=benmaster.es;'20's=default;'20't=1445540872;'20'bh=7gavP0UI1+I11qtCP+RS8hkO0DtU1PvseZtdrM1ki6Q=;'20'h=To:From:Subject:Date:From;'20'b=

Canonicalized Body:
    test'20'content'0D''0A'


DNS record(s):
    default._domainkey.benmaster.es. 3409 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9w15kGsaayPUGElNmvDdwu3uvrdgFuZLl1Sdqsm/QHLT8WAPMwCoY5RfsKUtEkjyqwsIzfgnFAfqJz5KDCaFp762R/L1VxMnUhEWMhuOowz3Vjo3sQb0IU8nyFHUsQvSASJ0PKlzSzS6wx4im71LOfnWKzF+FcIXKpd98gixldwIDAQAB"

Public key used for verification: default._domainkey.benmaster.es (1024 bits)

NOTE: DKIM checking has been performed based on the latest DKIM specs
(RFC 4871 or draft-ietf-dkim-base-10) and verification may fail for
older versions.  If you are using Port25's PowerMTA, you need to use
version 3.2r11 or later to get a compatible version of DKIM.

----------------------------------------------------------
Sender-ID check details:
----------------------------------------------------------
Result:         pass 
ID(s) verified: header.From=admin@benmaster.es
DNS record(s):
    benmaster.es. SPF (no records)
    benmaster.es. 3409 IN TXT "v=spf1 mx a:mail.benmaster.es ip4:195.78.228.0/22 ip4:91.192.108.0/22 ip4:93.93.64.0/21 ip4:5.145.168.0/21 ip6:2a00:1d70::/32 ip4:37.134.112.28 mx:mail.benmaster.es mx:develutils.com -all"
    benmaster.es. 3409 IN MX 10 mail.benmaster.es.
    mail.benmaster.es. 3409 IN A 37.134.112.28

----------------------------------------------------------
SpamAssassin check details:
----------------------------------------------------------
SpamAssassin v3.4.0 (2014-02-07)

Result:         ham  (-2.0 points, 5.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 0.0 RCVD_IN_SORBS_DUL      RBL: SORBS: sent directly from dynamic IP address
                            [37.134.112.28 listed in dnsbl.sorbs.net]
-0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
-0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain
-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                            [score: 0.0000]
-0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from author's
                            domain
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily valid
-0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature

==========================================================
Explanation of the possible results (from RFC 5451)
==========================================================

SPF and Sender-ID Results
=========================

"none"
      No policy records were published at the sender's DNS domain.

"neutral"
      The sender's ADMD has asserted that it cannot or does not
      want to assert whether or not the sending IP address is authorized
      to send mail using the sender's DNS domain.

"pass"
      The client is authorized by the sender's ADMD to inject or
      relay mail on behalf of the sender's DNS domain.

"policy"
     The client is authorized to inject or relay mail on behalf
      of the sender's DNS domain according to the authentication
      method's algorithm, but local policy dictates that the result is
      unacceptable.

"fail"
      This client is explicitly not authorized to inject or
      relay mail using the sender's DNS domain.

"softfail"
      The sender's ADMD believes the client was not authorized
      to inject or relay mail using the sender's DNS domain, but is
      unwilling to make a strong assertion to that effect.

"temperror"
      The message could not be verified due to some error that
      is likely transient in nature, such as a temporary inability to
      retrieve a policy record from DNS.  A later attempt may produce a
      final result.

"permerror"
      The message could not be verified due to some error that
      is unrecoverable, such as a required header field being absent or
      a syntax error in a retrieved DNS TXT record.  A later attempt is
      unlikely to produce a final result.


DKIM and DomainKeys Results
===========================

"none"
      The message was not signed.

"pass"
      The message was signed, the signature or signatures were
      acceptable to the verifier, and the signature(s) passed
      verification tests.

"fail"
      The message was signed and the signature or signatures were
      acceptable to the verifier, but they failed the verification
      test(s).

"policy"
      The message was signed but the signature or signatures were
      not acceptable to the verifier.

"neutral"
      The message was signed but the signature or signatures
      contained syntax errors or were not otherwise able to be
      processed.  This result SHOULD also be used for other
      failures not covered elsewhere in this list.

"temperror"
      The message could not be verified due to some error that
      is likely transient in nature, such as a temporary inability
      to retrieve a public key.  A later attempt may produce a
      final result.

"permerror"
      The message could not be verified due to some error that
      is unrecoverable, such as a required header field being
      absent. A later attempt is unlikely to produce a final result.


==========================================================
Original Email
==========================================================

Return-Path: <admin@benmaster.es>
Received: from benmaster.es (37.134.112.28) by verifier.port25.com id h54q0o20i3gh for <check-auth@verifier.port25.com>; Thu, 22 Oct 2015 15:07:56 -0400 (envelope-from <admin@benmaster.es>)
Authentication-Results: verifier.port25.com; spf=pass smtp.mailfrom=admin@benmaster.es
Authentication-Results: verifier.port25.com; domainkeys=neutral (message not signed) header.From=admin@benmaster.es
Authentication-Results: verifier.port25.com; dkim=pass (matches From: admin@benmaster.es) header.d=benmaster.es
Authentication-Results: verifier.port25.com; sender-id=pass header.From=admin@benmaster.es
Received: from [192.168.1.130] (unknown [192.168.1.130])
    by benmaster.es (Postfix) with ESMTPSA id 9D64D15E02BC
    for <check-auth@verifier.port25.com>; Thu, 22 Oct 2015 21:07:52 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=benmaster.es;
    s=default; t=1445540872;
    bh=7gavP0UI1+I11qtCP+RS8hkO0DtU1PvseZtdrM1ki6Q=;
    h=To:From:Subject:Date:From;
    b=OcveYhBHbZ2FGj5wF6DOYjcqc4SgS3ZAhahjaLmzW1odIKdu57ERXefgT1lzJXJX1
     AUVblWqV/2x+sAj23fkqma3ZfcOX07yaauprlVNYnksR42PS1mC0B5fZgCMJrXRfzY
     /4VyXrAcNo8jvDu8CtDc7Y2DTYMjF4wAQfEJ8XZ4=
To: check-auth@verifier.port25.com
From: Admin <admin@benmaster.es>
Subject: test title
Message-ID: <5629340E.1080709@benmaster.es>
Date: Thu, 22 Oct 2015 21:07:58 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.3.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

test content

and here is the headers of Gmail email

Delivered-To: benmastertm@gmail.com
Received: by 10.202.86.5 with SMTP id k5csp730754oib;
        Thu, 22 Oct 2015 12:25:43 -0700 (PDT)
X-Received: by 10.180.92.230 with SMTP id cp6mr152455wib.27.1445541942926;
        Thu, 22 Oct 2015 12:25:42 -0700 (PDT)
Return-Path: <admin@benmaster.es>
Received: from benmaster.es (28.112.134.37.dynamic.jazztel.es. [37.134.112.28])
        by mx.google.com with ESMTP id bn8si410727wib.15.2015.10.22.12.25.42
        for <benmastertm@gmail.com>;
        Thu, 22 Oct 2015 12:25:42 -0700 (PDT)
Received-SPF: pass (google.com: domain of admin@benmaster.es designates 37.134.112.28 as permitted sender) client-ip=37.134.112.28;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of admin@benmaster.es designates 37.134.112.28 as permitted sender) smtp.mailfrom=admin@benmaster.es;
       dkim=pass header.i=@benmaster.es
Received: from [192.168.1.130] (unknown [192.168.1.130])
    by benmaster.es (Postfix) with ESMTPSA id 2165C15E02BC
    for <benmastertm@gmail.com>; Thu, 22 Oct 2015 21:25:38 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=benmaster.es;
    s=default; t=1445541938;
    bh=/1ZBry+NdQjznJaib9+bpY+Y4vtYEcA6MqRIEawa78Q=;
    h=To:From:Subject:Date:From;
    b=r9KafDYmnr+hgKpz+VhuV1QRxQ+L7qnBzJ6vFGNsU1xmYPHJU0WCF3I6l0W3niW7C
     LNZj9lkwWL6hyjWC+7LsFpQhX5UMPbamjxQxR1wmrpHsT5A3eZ9M8VeRmgkhnSOKo8
     +IcgOnJNlhlKVdrHroCb2IykegEcjg4IGWR5kmbI=
To: =?UTF-8?Q?Benjam=c3=adn_Rabad=c3=a1n_de_Jes=c3=bas?=
 <benmastertm@gmail.com>
From: Admin <admin@benmaster.es>
Subject: hola
Message-ID: <5629383A.70600@benmaster.es>
Date: Thu, 22 Oct 2015 21:25:46 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.3.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

again

and here is the /var/log/mail.log

Oct 22 21:25:38 benmaster postfix/submission/smtpd[2651]: connect from unknown[192.168.1.130]
Oct 22 21:25:38 benmaster postfix/submission/smtpd[2651]: 2165C15E02BC: client=unknown[192.168.1.130], sasl_method=PLAIN, sasl_username=admin@benmaster.es
Oct 22 21:25:38 benmaster postfix/cleanup[2661]: 2165C15E02BC: message-id=<5629383A.70600@benmaster.es>
Oct 22 21:25:38 benmaster postfix/qmgr[1307]: 2165C15E02BC: from=<admin@benmaster.es>, size=649, nrcpt=1 (queue active)
Oct 22 21:25:38 benmaster postfix/submission/smtpd[2651]: disconnect from unknown[192.168.1.130]
Oct 22 21:25:38 benmaster postfix/smtp[2663]: 2165C15E02BC: to=<benmastertm@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.195.27]:25, delay=0.74, delays=0.12/0/0.1/0.52, dsn=2.0.0, status=sent (250 2.0.0 OK 1445541942 bn8si410727wib.15 - gsmtp)
Oct 22 21:25:38 benmaster postfix/qmgr[1307]: 2165C15E02BC: removed

as you can se, all its ok, but, Gmail and hotmail send emails to SPAM.
I changed the DNS records some times, modify the postfix config more times, more hours trying… any help its welcome.

My answer:


You tried to send email to Google from a residential or mobile (3G/4G) ISP. Almost all of these are blacklisted and you should expect mail to be always delivered to spam or bounced entirely.

To solve the problem, relocate your mail server somewhere else.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.