Gmail mark all emails as spam sent by postfix

Discussion in 'Installation/Configuration' started by ookonek, Feb 19, 2016.

  1. ookonek

    ookonek New Member

    I have small server hosting with few domains. I am useing ispconfig with postfix. When I send mail from my server (nevermind from which domain) to gmail message is marked as spam.

    Domain: coolschool[dot]com[dot]pl or flyot[dot]com
    Address IP:
    DNS server: and (there is my dns servers)
    OS: Debian

    As you can see, my mail server is set up with the following:
    • The server has DKIM (could you check?)
    • SPF(TXT) is set correctly (it is?)
    • The server's PTR (reverse DNS) points correctly to my mail server (could you check?)
    • IP is not on blacklists
    • When I test this domain on I have warn: smtp: Reverse DNS is not a valid Hostname - what's that mean?
    • Another tools says is all good.
    • Postfix use only IPv4 (inet_protocols = ipv4)
    • I made all what I found on this and other sites.

    Here is mail header (sent by SquirrelMail webmail client):

    Here is postfix

    Last edited: Feb 19, 2016
  2. Well-Known Member HowtoForge Supporter

    Haven't check your SPF yet but if I do reverse DNS lookup I receive different domains ... this is bad.

    You set myhostname = in your postfix config, therefore it greets other servers with HELO
    If they check the IP and get as answert HELO differs and therefore is a missmatch.

    Make sure you use one hostname and configure your reverse dns to always return the domain you used there.

    Also if you want to use virtual domains you may also want to use something like since you shoudn't / can't have it in mydestination AND in virtual listings therefore you have hard times to setup mail accounts for that domain.
  3. ookonek

    ookonek New Member

    I don't think is very bad, I added two PTR records ( and becouse before it was same situation. I mean when I had only one PTR to
    However I will change it.

    So how to correctly setup bind zone for each domain when I have on one IP ten domains? You sugest about change...
    For example: @ IN MX 1 Change to @ IN MX 1
    in bind zone? I think it is same record.
  4. Well-Known Member HowtoForge Supporter

  5. ookonek

    ookonek New Member

    Yes, before write this post I trired to test spf record with -all and ~all - still nothing.
    I removed PTR record, and now nslookup show name only as - still nothing is an alias for domain name pointer It could be?

    Thank you, but do you have any more idea?

    This is mail sent to gmail, marked as a spam:
    Last edited: Feb 19, 2016
  6. Well-Known Member HowtoForge Supporter

    basically I don't see any issues here - I could imagine there are still some mechanisms remembering that IP was marked spam previously - shouldn't take too long that is going to reset, I'd assume something between a few and max. 48 hours - but can't say that for sure.

    There should be no issue with your alias setup - which I've not seen very often. Google for example also uses, and so on as hostnames / rdns for their instances.
    Typically you pick something like "machinename.domainname.tld" - but yeah, I don't really see the issue here why your mail is still sorted as spam.

    I'd probably just wait a few hours and try again. Maybe someone else has some more suggestions?
  7. ookonek

    ookonek New Member

    Still nothing...
    Really, someone else has more suggestions?
    All who read this post don't know how to resolve this problem?
  8. Nap

    Nap Member

    Have a read of this thread on mail settings that relate to DNS and spam.
  9. ookonek

    ookonek New Member

    Thank you Nap!

    But I don't see any problem in my mail. :(

    Ok, I see: DomainKeys check: neutral, but I think is not issue. what do You think? :)
  10. Nap

    Nap Member

    Another thing I noticed, with regards to Outlook 2007 is that if you don't set your email address correctly in the Internet E-mail Settings dialog (E-mail Address field), gmail will mark your mail as spam. This is in the Account Settings area for adding/editing accounts.

    I'm not sure if this is a problem with other mail clients.
  11. Well-Known Member HowtoForge Supporter

    Google does some analyzing of the mails content to make sure it's legit.
    It does not, or at least didn't in the past, really needed DKIM, not even showing the results to users.
    The only difference between usual setups I know and yours is, you use somehost.tld as servername instead of machinename.domain.tld
    which shouldn't be an issue. Also your IP has no bad, in fact no reputation at all.

    What if you don't use webmail but some proper mail client for sending mails ( not having some of their advertisments in its header fields like "sent using phpmailer xyz" "sent by webmail on foo version bar". Maybe google likes something like Thunderbird headers better - I don't know. Maybe you just need to send more mails, also to other users, who mark them as "no spam" - this could help.

Share This Page