GMail ipv6 bouncing error – but ipv4 works

Intro you DGAF about:
I had this problem on my server recently, I spent some time scratching my head, checking every other tutorial and stackoverflow answer, here’s my checklist.
There are tons of tutorials on how to do each one of these things, so I won’t rewrite any of these.
In my case, it was on an OVH server.

  1. Server level: Check that the server actually has IPv6 installed and running.
  2. Server IP level: Check that there is a rDNS on your server. It has to be an IPv6 rDNS, not an IPv4 one.
  3. Server level: Check your hosts files
  4. DNS level: Check your SPF/PTR record.
    Here’s a simple one: "v=spf1 a mx ~all" must be your rDNS name.
  5. DNS level: Check that you have an AAAA record for your IPv6

That’s about it.
You do NOT need DKIM nor DMARC, a simple SPF/PTR record is enough to not be bounced or marked as spam.
Don’t forget to secure your mail server.