Emails routed to smap folder in gmail

Discussion in 'Installation/Configuration' started by Eliezer Ga, Jan 23, 2021.

  1. Eliezer Ga

    Eliezer Ga Member

    Hi All,

    I hope all of you are well, we have an issue sending emails to Gmail, it always straight to spam folder.

    These are the things that I did base on my research on this forum:
    1) I already Check the DNS of the hostname and ensure that the hostname of the server is set also as the hostname in postfix main.cf.
    2) I check the reverse DNS record of your IP and match the hostname.
    3) I check that if the server IP is not on any blacklists.
    4) SPF record is added and running properly
    5) DKim is added and set the strength to 2048

    I am running out of options. Your help will be very much appreciated. Thank you
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Your doing the right things, those are the main ones to address; you could verify your DKIM signing is correct (can be verified), and you could check into any whitelists that you could work to have your domain and/or ip on (I don't know the names of any with manual request policies without checking, but there are some, though most are automatic based on reputation). You might set a DMARC policy if you don't have one. Be sure to move your mail from spam to inbox in gmail to trim that side. Possibly adding your address to contacts and sending some email would help (I don't know if gmail issue that as a spam signal). Unfortunately building your ip reputation takes a little time; domain reputations can be influenced by you a little more.
     
  3. Eliezer Ga

    Eliezer Ga Member

    Hi,

    I tried to do a test mail to gmail and still sent to smap folder I check the email header and use the mxtoolbox website to do email header test and found this result:
    upload_2021-1-24_1-13-16.png
    however on the email header of gmail it said that it pass please see image below:
    upload_2021-1-24_1-15-18.png
    is this can help us to find the root cause of this issue?
     

    Attached Files:

  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    I had the same issue with gmail. Usually I tell people not to disable IPv6, but in this case, I added this to my master.cf:
    Code:
    smtp-ipv4     unix  -       -       -       -       -       smtp -o inet_protocols=ipv4
    This in /etc/postfix/main.cf:
    Code:
    transport_maps = hash:/etc/postfix/transport
    in etc/postfix/transport:
    Code:
    gmail.com smtp-ipv4:
    google.com smtp-ipv4:
    *.google.com smtp-ipv4:
    googlemail.com smtp-ipv4:
    *.googlemail.com smtp-ipv4:
    Then run:
    Code:
    postmap /etc/postfix/transport
    systemctl restart postfix
    After that, I had no problems.
     
    Last edited: Jan 23, 2021
  5. Eliezer Ga

    Eliezer Ga Member

    I follow your instructions but still emails are routed to Spam. I also change the DMARC Record from p=none to p=quarantine so that because I receive an error when I run DMARC checker in mxtoolbox. It fix the result however still getting emails go straight to spam. Is there any other options that I can do? Thank you
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Click the red DKIM Authenticated text to see why it fails.
     
    Th0m likes this.
  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  8. Eliezer Ga

    Eliezer Ga Member

  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Can you share the details under "SpamAssassin thinks you can improve"?
     
  10. Eliezer Ga

    Eliezer Ga Member

    Hi,
    When I click the DKIM error it shows this
    upload_2021-1-24_19-11-7.png

    upload_2021-1-24_19-11-36.png
     
  11. Eliezer Ga

    Eliezer Ga Member

    Here is the result:
    upload_2021-1-24_19-14-7.png
    upload_2021-1-24_19-14-50.png
     
  12. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  13. Eliezer Ga

    Eliezer Ga Member

  14. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    The main problem is that your host is missing a rDNS address. You have to set up a reverse DNS record for both your IPv4 and IPv6 address with your provider. The record should be the hostname of your server.
     
  15. Eliezer Ga

    Eliezer Ga Member

    Hi Th0m,
    my apology, only the ipv4 and ipv6 are the one that I needed to put in rDNS? based on /etc/hostname only the name of the server "web1" only that is the record there.
    Are you able to give me example?

    Thank you so much
     
  16. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You have to set up a rDNS (PTR) record with your network provider for the IPv4 and IPv6 address. You can find your hostname by running
    Code:
    hostname -f
    It should be a FQDN like server1.example.com
     
  17. Eliezer Ga

    Eliezer Ga Member

    Hi Th0m,
    When I run "hostname -f" command it show "web1" only there is no ".example.com" what should I do to make it server1.example.com if I run the command
     
  18. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    In /etc/hostname, you should have
    Code:
    server1.example.com
    in /etc/hosts you should have
    Code:
    127.0.1.1 server1.example.com server1
    Where server1 is your host (for example web1) and example.com is your domain. The FQDN should have A (and eventual AAAA) records that point to your server.
     
  19. Eliezer Ga

    Eliezer Ga Member

    Hi Th0m,
    Thank you. I will look into this and will get back to you
     

Share This Page