Why does my mail end-up in gmail spam folder?

Discussion in 'General' started by todx, Dec 4, 2015.

  1. todx

    todx Member

    My mail keeps falling into the spam folder. I visited Bulk Senders Guidelines (page by Google, explains what to do in case mail falls into spam folder) to see why they mark it as spam and all it said is that I need to have a valid Reverse DNS records (which I do), sign messages with DKIM (don't have this), create SPF record (I did as TXT record) and publish a DMARC policy (didn't do this yet).

    I tried the DKIM thing, but when I try to install the path I get: (I cloned this patch from a git repo)
    PHP Parse error:  syntax error, unexpected ''/etc/amavisd.conf'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /home/erik/dkim/install.php on line 61
    I also went to dnsinspect.com which gives a full DNS report and everything seems fine. You can see the report here.

    Any ideas why my emails end-up in the gmail spam folder?
    Last edited: Dec 4, 2015
  2. florian030

    florian030 Well-Known Member HowtoForge Supporter

    There was a typo in the installer. Try to download the archive again.
    todx likes this.
  3. todx

    todx Member

    Installation was successful. Thank you.

    At the end of installation I get "...set the DKIM-Path under...", what path is this? Should I use the DKIM-Keys path (/var/lib/amavis/dkim) mentioned before in the installation?

    Also when it says "check permissions manually (750 for amavis.amavis or vscan.vscan), I searched for those files but couldn't find them... ("find / -name amavis.amavis" and "find / -name vscan.vscan"), or did I get that wrong?
  4. florian030

    florian030 Well-Known Member HowtoForge Supporter

    add /var/lib/amavis/dkim to dkim-path
    /var/lib/amavis/dkim should be owned by amavis.amavis or vscan.vscan (depends on your os) and should have permissions 750

    i will not update the installer as this is already integrated in ispconfig 3.1 ;)
    todx likes this.
  5. todx

    todx Member

    Ohhh, I see what you mean. :)

    Because everything under /var/lib/amavis/ is owned by amavis:amavis, I did the following:
    cd /var/lib/amavis
    chown amavis:amavis dkim/
    chmod 750 dkim/
    Thanks for all your help florian.
  6. todx

    todx Member

    My emails still end up in spam... Any other ideas?
  7. gral

    gral Member

    Hi, many things may occur there.. is your IP listed at any spamlist ?, are you authenticating the sender to deliver your mails? .
    You can setup the SPF records to the domain and looks the headers could be very useful as well.
  8. todx

    todx Member

    My PTR record is fine and my server is not blacklisted nor is it in a spamlist. The only problem I can see so far is "Reverse DNS does not match SMTP Banner" which I don't know how to fix. I assume that my SMTP banner sends back a subdomain "server1.kokica.si" which is not my MX record. Also what do you mean by am I authenticating the sender?

    (according to every tool available on mxtoolbox.com everything seems to be great)

    Edit #1: I also analyzed mail headers and everything seems fine. (check results here)
    Last edited: Dec 4, 2015
  9. gral

    gral Member

    "Reverse DNS does not match SMTP Banner" that means that your server hostname/banner should be the same to your PTR records.

    To see your PTR record do;
    $ host 111.222.333.444
    444.333.222.111.in-addr.arpa domain name pointer server.yourdomain.com

    If doesnt machetd you can easily change your SMTP Banner / HELO changing the postfix var smtp_helo_name

    In your particular case your PTR doesnt looks fine to me..

    $host domain name pointer 111.ip-51-255-34.eu.

    try adding the vars in your main.cf
    smtpd_banner = 111.ip-51-255-34.eu ESMTP $mail_name

    Also what do you mean by am I authenticating the sender?
    Are you sendin the mails over a SASL or other auth , or just using a mail () php function

    Again, gmail ( webmail interface ) provide the mail headers, for sure there you will found interesting info , plus if your messagers are arriving as spam
    todx likes this.
  10. todx

    todx Member

    Thanks for your help gral and florian030, you were absolutely correct, my PTR record was completely wrong. Fortunately for me, my provider allows me to change PTR record as I please, so I just changed it to "bela.kokica.si", this hostname is also the hostname of my server and my MX record. Everything works perfect now.

    Thanks again!
  11. One good way you can contact receivers and ask them to mark your email as not spam. And then you can send emails to them regularly you can see your emails are always in inbox.

Share This Page