Why my postfix outgoing mail doesn't go to spam in gmail but it goes to spam folder in yahoo & hotmail?

March 31, 2017 1.1k views
Email Ubuntu

I have followed the instructions in

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-14-04

i have tested my spam score in

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

and i got 10 out of 10 as my score because i have set up the DKIM, SPF, _DMRAC, valid MX host, and valid TLS encryption.

i sent an email from my DO server to my gmail & zoho account and it didnt go to spam folder. Yet, when I sent it to my yahoo & hotmail account, it went to spam folder.

Is there anything that particular about yahoo and hotmail? What set up so I can pass the spam filter in their system?

2 Answers

There's no clear answer, since they would never directly tell about their spam-filters.

Is it a new domain?
Have you sent a lot of emails over the past three months (define a lot)? And to the Yahoo/Microsoft domains?

@ganiszulfa

Do you have a valid PTR (Reverse DNS) record?

PTR records are created for your Droplet during deployment, though can be modified by changing the name of your Droplet post-deployment.

For example, if you deployed a Droplet named mail, the PTR record is not valid. If you named your Droplet mail.yourdomain.ext, a FQDN/FQHN, your PTR record will be valid. This is the only way to setup a PTR record with DigitalOcean for the time being and the documentation doesn't actually put this out there.

The same applies for any Droplet, whether it's a web/database server, proxy server, etc. You can set a valid PTR record by just changing the name of the Dropet.

Valid Droplet Name Examples

web01.domain.ext
db01.domain.ext
mail.domain.ext
mx.domain.ext

Invalid Droplet Name Examples

web01
db01
mail
mx

Where domain.ext is your domain (ext = extension -- .com, .net, etc).

Once the PTR is set, make sure you've set the hostname to match from the CLI using hostname.

i.e.

hostname mail.domain.ext

Where mail.domain.ext is the same as the [new] name of your Droplet (as per my examples).

Even though for web, database, proxy, and similar servers, a valid PTR may not do much, when it comes to mail servers, it needs to be valid.

About the only time I don't bother is when setting up a VPN.

  • hi @jtittle thanks for the reply,

    for PTR record, I did:

    1. change it in DO control panel
    2. do this sudo hostname mydomain.com
    3. modify the content here nano /ect/hostname

    restarted the server and i believe my PTR is valid i did check it with this PTR record checker -> https://mxtoolbox.com/ReverseLookup.aspx

    for now, I think it's because my IP is somewhat new and yahoo/hot mail just don't trust it.

    • @ganiszulfa

      I would run it through their blacklist check as well, just to make sure they didn't blacklist the IP. It's not impossible to get removed, though it can sometimes be difficult. The sooner you catch it, the better.

      https://mxtoolbox.com/blacklists.aspx

      You may also want to reboot the Droplet just in case there's anything running that relies on the hostname being set, and that wouldn't normally set when running hostname.

      You can do this from the CLI by typing in reboot and hitting enter. You'll disconnect and be able to log back in within 20-30 seconds or less in most cases.

      • Thanks a lot for your help. My IP wasn't blacklisted. I have tried other things and still didn't work. I ended up using email delivery services like postmarkapp + mailgun.

Have another answer? Share your knowledge.