I'm trying to set up a raspberrypi 4 as a mail server.
Since I own a domain name using a provider (gandi.net), I use this domain name for my mail server (with mx records, redirection to the raspberry, etc.)
Using the tutorial of Makeuseof, I did configure the pi to send mail. But the thing is, when I try to send a mail to, for example, my gmail account, I receive the error :
IP you're using to send 550-5.7.1 mail is not authorized to send email directly to our servers.
I have read other posts about it, so I went to https://check.spamhaus.org/ and tried to allow my IP address to be removed from the ban list (which I'm still waiting for).
But another solution that I've seen is to set a ptr record, redirecting my IP address back to my domain name.
For that, I've installed dnsmask, and I've set a redirection in my /etc/hosts
file, by adding this line :
2001:0db8:85a3:0000:0000:8a2e:0370:7334 mail.example.com.
For obvious reason, those are not the actual address that I'm using, but the principle is here, and yes, I'm hosting everything under my ipv6 address.
So my question is : will this manipulation work, redirecting my ipv6 address toward the domain name, and is the ptr record settled correctly? Or is there another way to convince google servers that my mails are send using my domain name?
Thanks by advance for those who will read this.