0

I have setup an smtp postfix server, with opendkim, on a domain code-gmail.com

I have put spf policy, dkim, dmarc in my domain TXT recors. I did setup reverse dns, to point correctly do my domain, i filled in mx servers ( mail.code-gmail.com ), even though i do not have any pop3/imap servers for handling incoming mails yet. So i decided to test on www.mail-tester.com, here are the results:

https://www.mail-tester.com/web-cwl7x

As you can see all is good, my ip is not on any blacklist on mail teser, all the checks are fine basically. This is my vps ip check:

https://mxtoolbox.com/SuperTool.aspx?action=blacklist%3a94.156.35.221&run=toolpage

Here are the source message rejected by google:

Delivered-To: test.gmail.acc.1234@gmail.com
Received: by 10.138.18.148 with SMTP id p20csp4976847ocs;
        Tue, 1 May 2018 09:23:28 -0700 (PDT)
X-Google-Smtp-Source: AB8JxZphPyaP52N0Vo0YpZdurlUaf5/jfaqpLwcyt15ne8k/OjWcjDppRKuXA8+jqIWJiRVOt9vw
X-Received: by 10.28.177.197 with SMTP id a188mr9309507wmf.121.1525191808352;
        Tue, 01 May 2018 09:23:28 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1525191808; cv=none;
        d=google.com; s=arc-20160816;
        b=kLoVVH/zEgvAcSSIEYqRCqj8OhPsxFvh8QFZK3QSuwWLelfcsfFX7BDje6aFZGqYqx
         rpqL9piArj2/uX5yilQA0TtOfF5oHp4slKS3eA10xD3mEI0WQ0ndn9c3jEJKVGs/InGC
         Z3ToNpl2hgXeR6iZNxI5RNJkGZcoJ9rfFQf2Ksc1Aa1PLUKDhoTFCD9rl7ReToHIGcUH
         31DrhwRRpBu2FgO0ieXVnmDeFjU+mRpoDOXV8Rb5VbV1tgRSxgd+25FjVSp/DmGjUWrW
         xmX7FaZqQwCtlrikRTxCFMCjPH9GcKvlJPOZj1I2scXJIbOixrq5enC4IwLRRi4kAJ9s
         YlXQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=from:date:message-id:to:subject:dkim-signature
         :arc-authentication-results;
        bh=QY3eSg1xUkClxZc7O05HDfwJPvSkbBuZINP6T4PQvjc=;
        b=guQW86/LrMSBUXT5jv3tE49/OrXqEHvvI9M/8NhrUMLMUNumFHr2Ut8Hbh5TeuBfSH
         9NW2G2p6Rk6HIS2twdvp6EgecNiiNGVR8JrBjQLs4kvAw4tCveIcechv9kq6loosMWlF
         pS4hcWzLyBr9OIDIJJ7MDX3P8HMR+BMrm+yu2ujFuvvDxsk1ky6jaLSTE3/2Hyk55SRU
         U9N2zQ8fbhrZrAGjZXya6k1tXNpmNInKJrhKMjYr4/kbDAME70bqd51hBPOYVnDc0aV7
         3+EBz44sxAzjnuOSWIWAkaZie2pPdSy6BPFh08Y4h/mViBDxibjvfDi8+Bew7BW08yWe
         VIVQ==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@code-gmail.com header.s=mail header.b=jGd+dERp;
       spf=pass (google.com: domain of root@code-gmail.com designates 94.156.35.221 as permitted sender) smtp.mailfrom=root@code-gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=code-gmail.com
Return-Path: <root@code-gmail.com>
Received: from code-gmail.com (code-gmail.com. [94.156.35.221])
        by mx.google.com with ESMTPS id l9-v6si23460wrf.176.2018.05.01.09.23.28
        for <test.gmail.acc.1234@gmail.com>
        (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
        Tue, 01 May 2018 09:23:28 -0700 (PDT)
Received-SPF: pass (google.com: domain of root@code-gmail.com designates 94.156.35.221 as permitted sender) client-ip=94.156.35.221;
Authentication-Results: mx.google.com;
       dkim=pass header.i=@code-gmail.com header.s=mail header.b=jGd+dERp;
       spf=pass (google.com: domain of root@code-gmail.com designates 94.156.35.221 as permitted sender) smtp.mailfrom=root@code-gmail.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=code-gmail.com
Received: by code-gmail.com (Postfix, from userid 0) id 4314B100E8B; Tue,
  1 May 2018 12:23:27 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=code-gmail.com; s=mail; t=1525191807; bh=QY3eSg1xUkClxZc7O05HDfwJPvSkbBuZINP6T4PQvjc=; h=Subject:To:Date:From:From; b=jGd+dERp+63VqVk00N2izdi/FQrlJWfK0VbzSuE9LOtOd2AXo/fNKcCb8lH9Zf7zl
     6VX5OTfXpKKWlD39fnnfAE7Kolytr6iLQvapHTq77h76Bcyga6PC7oCH8v33VxpVdT
     RuaYUTwK57Ar+fsnKpFPWWtj0dYRqHpL1NJCQQQUt4VD4aQ0w78+iHF/RGfQpIrSOE
     6Ve2vP/D9h58OuE+o3jR3ly+6e6LKaVewul45dDMhgFdzqGAQOIF7Md56AGspGLE+B
     UMpRWBFC6ordrcr23710qK7U418ddx+1qwHnHioG6WM4ZU+hAJfg1h2AucIyJjqjkb
     IMlltYlM1W30Q==
Subject: Lol hi mate! We need to build stuff as soon as possible
To: <test.gmail.acc.1234@gmail.com>
X-Mailer: mail (GNU Mailutils 3.1.1)
Message-Id: <20180501162327.4314B100E8B@code-gmail.com>
Date: Tue,
  1 May 2018 12:23:27 -0400 (EDT)
From: root <root@code-gmail.com>

Hellp there mate. What about those vehicles?

Can someone help? I think i did something wrong with dmarc/dkim maybe. My dkim looks like this:

mail._domainkey.code-gmail.com IN TXT v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtRdiLkqfjnqh5Dj6YLZqm1X+khDI1diBEEyj1F3NwSbay8n3qUoX6QtBDDb+7DClerJBT5BSW4OUPdnf1UgimrKOdtb/KjE2gTKbQXBrlvXP0++DjTzayu724hsavwl7yYThndqurDJWKLjZxwmjb8KJwuvPSnUXzCuN4zDBheYtLKP0RBYB3B3VauRuDKPot2/1iihVqHycrB0oe2ohOxWJz47qxp1vylkMTtwIDy/6Pe2JK/Dph70JvI3mIIdkQGT8P1dcGdemVonCfvYQaluVSXvmfxl32PHN50RAu0PzNYEk0/+UIXUQxCFbGNSnUbAWWrYbKjxFBvjQU5sywwIDAQAB

and same dkim entry for key : default._domainkey.code-gmail.com

My spf:

v=spf1 include:_spf.google.com ip4:94.156.35.221 ip6:2a07:5741:0:eb4:0:0:0:1 ip6:2a07:5741:0:eb4::1 ~all

My dmarc:

_dmarc.code-gmail.com IN TXT v=DMARC1; p=none

Also i did sign up for postmaster.gmail.com, and i verified my site there with the TXT record like this:

code-gmail.com IN TXT google-site-verification=r5XK7qGOY2bA43-bkq9jCrFzt7fYDXAdsdVmrp3XEw390Cxo

I have encryption enabled in postfix, so the letters that arive in gmail are encrypted with TLS.

Can someone help? I'm pretty sure there is something wrong with either dmarc or dkim.

I send test email with mail from my vps, like this:

echo "Making a pizza" | mail -s "Semolina flour and good salami with the plume tomatoes, are the only secret." email@gmail.com

That's why it defaults to root@code-gmail.com

  • Your headers show the DKIM/SPF/etc. pass. IMO, your message *content* just *looks* spammy. Your spam score and what Google calculates may be wildly different - theirs is more complex than SpamAssassin's, and has a lot more data to work with. – ceejayoz May 01 '18 at 16:52
  • @ceejayoz can you suggest any pattern to try? I mean i just get some random phrased out of my head, and try to send them. – ThinCrustItalianPizza May 01 '18 at 16:53
  • 1
    (Hell, their systems might not like your domain, `code-gmail.com`, as it might be detected as a possible phishing attack. Consider the fact that Gmail is likely to be a trademarked name...) – ceejayoz May 01 '18 at 16:53
  • @ceejayoz i gonna try other domain on same vps to check – ThinCrustItalianPizza May 01 '18 at 16:55
  • Remember also that part of Google's spam analysis is "have we seen this IP/domain before? does it have a good long-term reputation?" There are a **lot** of factors at play here. I let an email service provider like Amazon SES or Sendgrid handle outgoing mail rather than trying to bash my head against the brick wall that is Gmail/Hotmail/Yahoo spam filtering. – ceejayoz May 01 '18 at 16:56
  • A `root@` username probably isn't great either, incidentally. – ceejayoz May 01 '18 at 17:01

1 Answers1

0

I don't think it is a technical issue. You can see in the email header of the email that DKIM, SPF, and DMARC are configured correctly. I would say it's an email body problem. Gmail has aggressive spam filters so it's no wonder why your email lands in the spam folder. Change the text and test again.

I would recommend adding https://www.emailchecky.com/ to your toolset. This free tool analyzes the email rather than just check it superficially. It's a good addition to Mail-Tester.