First of all im sorry for my broken english and im very new in webhost but i love CyberPanel.
How to avoid your email going to client/user Gmail spam folder? I have troubleshot this and find a workaround for almost 1 week. I have read somewhere if the server have IPv6 and dont enable it Gmail will mark sent email as SPAM.
Please note, before im doing from step 2 till end i already get Pass mark for SPF, DKIM and DMARC on Gmail ‘Original Message’
Here is what im doing;
-
Follow all these steps Achieve 10/10 Email score with CyberPanel!
-
You also need IPv6 and Reverse DNS (rDNS) and point to your domain same like IPv4, make an AAAA record for your mail.domain.tld. After DNS propagation is complete check it using MXtoolbox (MX Lookup)
-
If you are using CloudFlare like me the DKIM you get from CyberPanel DKIM Manager should look like this:
"v=DKIM1; h=sha256; k=rsa; " "p=PS9v22Gnk3XAx3sRhVyRbL8jyWaP6QnTPw7cWpqDtPnbdzz2SCNpppnsJ7tCK8rFTYnnd4LYQnbxtE3NWCvKSHLax6CMvGsF3vLCeezhJeCrvydh8rn6yVt5YVJcDVPyT9CgBFyxnbnG7CFwpNzHysq4hL249Uu8GnVXDL2nKGy7TkewngsrLpN6W4tfVH5qzKrn6PVb3LKR2dVt5TM9cwUvgn9QMskWyzwTgBc4KT8zsfNbEKNrNYVNdD" "QAUsM8uqn8ACgFzmcEgEwTu2E4JHJDUaJwThpyXp7RQMEnzgRUEXnXhZVYVcqNcDz2BCuwDYFQxbbzrKswt3yeKPQW3xnbMR5MPzv7ntbcAGDAVxk3RXt68GnQQcPvycqpZYM23HDwfeCA"
You need to remove all quotes (") and spaces after p=, should look like this:
v=DKIM1; h=sha256; k=rsa; p=PS9v22Gnk3XAx3sRhVyRbL8jyWaP6QnTPw7cWpqDtPnbdzz2SCNpppnsJ7tCK8rFTYnnd4LYQnbxtE3NWCvKSHLax6CMvGsF3vLCeezhJeCrvydh8rn6yVt5YVJcDVPyT9CgBFyxnbnG7CFwpNzHysq4hL249Uu8GnVXDL2nKGy7TkewngsrLpN6W4tfVH5qzKrn6PVb3LKR2dVt5TM9cwUvgn9QMskWyzwTgBc4KT8zsfNbEKNrNYVNdDQAUsM8uqn8ACgFzmcEgEwTu2E4JHJDUaJwThpyXp7RQMEnzgRUEXnXhZVYVcqNcDz2BCuwDYFQxbbzrKswt3yeKPQW3xnbMR5MPzv7ntbcAGDAVxk3RXt68GnQQcPvycqpZYM23HDwfeCA
After that test your DKIM on DKIM Record Checker
-
Make sure your server IPv6 is setup properly and can ping google
ping6 google.com
Should output something similar to this if you’re connecting to IPv6:
PING google.com(par21s20-in-x0e.1e100.net (xxxx:xxxx:xxxx:xxxx::xxxx)) 56 data bytes 64 bytes from par21s20-in-x0e.1e100.net (xxxx:xxxx:xxxx:xxxx::xxxx): icmp_seq=1 ttl=107 time=11.9 ms 64 bytes from par21s20-in-x0e.1e100.net (xxxx:xxxx:xxxx:xxxx::xxxx): icmp_seq=2 ttl=107 time=8.34 ms 64 bytes from par21s20-in-x0e.1e100.net (xxxx:xxxx:xxxx:xxxx::xxxx): icmp_seq=3 ttl=107 time=8.43 ms 64 bytes from par21s20-in-x0e.1e100.net (xxxx:xxxx:xxxx:xxxx::xxxx): icmp_seq=4 ttl=107 time=8.43 ms
-
Edit your TXT record v=spf1 to use IPv6
v=spf1 ip6:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx ip4:xx.xx.xxx.xxx ~all
X should be your IP
-
Edit postfix main.cf
nano /etc/postfix/main.cf
Put this after inet_protocols = all
smtp_address_preference = ipv6
If you get SMTP Reverse DNS Mismatch while test it on MXToolbox change:
myhostname = yourreversednsdomain.tld
After save and exit your nano dont forget to reload postfix
systemctl reload postfix
Try sent email to your Gmail account.
Other tools i use to check:
checktls.com
Thank you.