Email gets registered as spam

February 9, 2016 2k views
Email Messaging Configuration Management


I finally have my own webserver and wanted to setup a mailserver.
Everything seems to have gone fine, except that Gmail registers my email as spam.

I have tried everything and I even have 10/10 on (Proof:

This is a header of an email getting blocked:

Hopefully you guys are able to help me
Kind regards

Note: this is not on my digitalocean server

  • I see the SPF and DKIM, but where's your DMARC? Note that not defining a DMARC entry may not be the only reason your emails are being marked as spam, but it may be a factor.

  • Hi gndo,

    Thank you for your fast reply!
    I am searching for a DMARC setup tutorial, but can't seem to find how I would do that.
    EDIT: Saw your link, looking into it!

    Kind regards

  • All right, I've set up my dmarc record, I still have a 10/10 on and the dmarc is listed, but the mail still gets put in the spam folder...

  • @jellef6287bdcd2 - It may take a while for you DNS to propagate. Look at your raw gmail header and see if the dmarc was acknowledged and passed. If not, then wait a bit.

  • @gndo
    Thank you so much for your help!
    This is the header:
    I don't think it's already propagated. I'll reply here in 24 hours if it's still not working.

    Kind regards

  • @jellef6287bdcd2 - Another thing I noticed, your reverse DNS is not valid.
    Edit - your reverse DNS hostname is invalid

  • @gndo I can't find how to do that.
    I have set this up to go to "" here:

    I have also searched for it for a long time, but dig -x returns my domain correctly?

  • @jellef6287bdcd2 - Again, this may be related to a propagation delay with regards to how DO automatically generates your PTR, but here's what is telling me:

    What you see when your domain has this problem:
        Reverse DNS is not a Valid Hostname
    More Information About Smtp Valid Hostname
    Your Reverse DNS Record (PTR) is not a valid host name. According to email sending best practices, a PTR Record should be a valid host name. If the PTR Record is not a valid hostname, there is a likelihood that you will experience email delivery issues with anti-spam services.
  • @gndo
    Yes, it could be, because I also changed that a few hours ago.
    I didn't even have a ptr record.

    This is my ptr record now: ptr TTL=4
    I don't know if it's right and/or if I should be pointing to

    Kind regards

  • @gndo
    This is the header now: Email still in spam folder :/

  • @jellef6287bdcd2 - spf,dkim,dmarc all pass. Scored negative one on spam. Should be good to go.

  • @gndo
    That was also the case yesterday. It just doesn't pass...

  • @jellef6287bdcd2 Huh? Compare X-Spam-Status from yesterday (score=1.0) versus today (score=-1.0)?

  • Yesterday I had -1.0 as well I think (another mail maybe)

    Maybe this is my problem now? (something new I saw today)
    My mail is getting sent as plain/text:
    It says "this mail is not encrypted by"

  • @jellef6287bdcd2 - Not sure what you're using to indicate that your email is spam? Encryption should not be necessary, but signing helps to not be marked as spam. If you want to make sure your email is being signed, send an empty mail to to receive a verification report. You should see that your public key was used to verify your mail.

  • @gndo
    I send an email to a gmail address and see that gmail blocks me.
    I have tested this with various email addresses.

    This is also weird:
    As you know, you've told me that the reverse DNS from my "mail" is not correct.
    But when I try it on mxtoolbox I get this:
    Which is correct right?

    Although, when I try an email test on mxtoolbox I get this:
    It looks like it detects "" somehow, and my reverse dns is

    I've sent an email to the email you provided and this is the report:

  • @gndo
    Seems like hotmail also blocks me.

  • @jellef6287bdcd2 - The summary report all checks out. Spamassassin gave it thumbs up. Apparent Indicators show your email is not spam. The only remaining potential problem is your reputation score, which is a block box to me as I don't exactly know how that is calculated. I'm out of ideas for you. Sorry.

  • @gndo Dangit! I was really hoping to find my problem...
    You don't have any idea why this happens? :

    "As you know, you've told me that the reverse DNS from my "mail" is not correct.
    But when I try it on mxtoolbox I get this:
    Which is correct right?

    Although, when I try an email test on mxtoolbox I get this:
    It looks like it detects "" somehow, and my reverse dns is"
    EDIT: I fixed the above! I had to set my reverse dns to instead of because it's not a good idea to set it as a bare domain name.

    Do you by chance know someone that could maybe find my issue? :/

  • @jellef6287bdcd2 - There's google's bulk senders guide and bulk sending troubleshooting guide that might be of use to you. Somewhere in there are their postmaster dashboards, which fortunately I've not had to use, and may have some info on their black box for reputation calculations.

2 Answers

All right, so I've got more informatin now.

I've contacted OVH, nothing was wrong with the IP. They couldn't do anything.
I also tried sending mails via mandrillapp (so with the same domain!!). That works (but I don't want that)
^ This may be an indication for something we're missing here... Any idea?
I'm now also sending mail via TLS instead of plain, because Google is now checking that as well. Still no solution tho.

Have another answer? Share your knowledge.