Postix Ubuntu only sending to gmail.

Posted December 16, 2014 6.9k views

So I’m currently working on my website where I set up postfix with Wordpress registration emails.
Now while users can receive emails at
Yahoo, Hotmail etc. are not able to receive emails, now I’ve googled and googled with no luck - I found another thread here about it, but that problem was solved with a new droplet. I’ve tried with a new droplet (new ip.)

And checked if my ip / domain was blacklisted with, which is not the case. Have also opened ports that was needed, even tried disabling my firewall.

So please any help, is great at this point.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

One of the problems I see a lot with this error is the PTR records don’t match your domain. what’s your domain?

  • My Domain is

  • As suspected your PTR is non-existent this would the first step to troubleshoot any deeper. if you check mxtoolbox and select ‘Reverse Lookup’ insert your ip address you will see it says 'No PTR record exists’

    To update your PTR record update your Droplet’s hostname through the control panel. I would use your domain as the droplet hostname.

  • Alright so I updated it, now it shows the PTR record - also with the use of mxtoolbox.

    How long should I wait, or should it be working right away?
    Because it’s not yet, I’ll give it a hurl in an hour or two, hopefully it works.

  • Just tested it again for the 3rd time.
    No luck, any other ideas?

    Thank you.

  • Let’s try this. Change your droplet hostname to something like 

    The ‘myserver’ part can be anything you want. Than go to DO control panel and under DNS in your domain add an A record. On the 'Enter name’ part enter whatever you decided to name your server 'myserver’ and Under Ip enter the ip for your droplet.

    Wait for the DNS propagation to happen, it shouldn’t take to long I would say probably at least 15 minutes. And test again.

    I used mxtoolbox supertool and there is a SMTP reverse DNS mismatch you can see it here

    Please get back after testing and let me know if that work. Also did you created MX records yet? if so the MX records need to match the new hostname
  • Still giving a mismatch, and no email received.

    Just to be perfectly clear, the A record name should only contain “myserver” and not “” right?

  • Right! only the myserver part or whatever you named it. Give it some time.

    What about the MX records?

  • Oh, I didn’t see the part about MX records, no I didn’t add it.
    Is there something specific that should go into name and priority?
    I’m guessing the name should be “myserver”

  • Create 2 MX records one with priority 0 and one with priority 30 and under name should be the hostname
  • Added both the records,
    still seems to give the mismatch using mxtool, and no email received.

  • Just give it sometime now, wait a couple of hours and will go from there. if after the couple of hours still a mismatch we might have to look into your Postfix configuration and make sure is set properly.

  • Just be clear this is how it’s all supposed to look right?

    All I did with Postfix was installing it, using a guide on Digitalocean.

  • No luck yet, do you have any other ideas Aquilar?

  • Sorry I was away. Can you post your postfix config file, let’s take a look at it.

  • Sorry for the late response, here’s my config file. :-)

    See /usr/share/postfix/ for a commented, more complete version

    Debian specific: Specifying a file name will cause the first

    line of that file to be used as the name. The Debian default

    is /etc/mailname.

    myorigin = /etc/mailname

    smtpdbanner = $myhostname ESMTP $mailname (Ubuntu)
    biff = no

    appending .domain is the MUA’s job.

    appenddotmydomain = no

    Uncomment the next line to generate “delayed mail” warnings

    delaywarningtime = 4h

    readme_directory = no

    TLS parameters

    smtpdtlssessioncachedatabase = btree:${datadirectory}/smtpdscache
    smtptlssessioncachedatabase = btree:${datadirectory}/smtpscache

    See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for

    information on enabling SSL in the smtp client.

    smtpdrelayrestrictions = permitmynetworks permitsaslauthenticated deferun$
    myhostname = BlazePlay
    aliasmaps = hash:/etc/aliases
    database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination =, BlazePlay, localhost.localdomain, localhost
    relayhost =
    mynetworks = [::ffff:]/104 [::1]/128
    mailboxsizelimit = 0
    recipientdelimiter = +
    interfaces = all