Email authentication records prevent your emails from being marked as spam.
SPF Record
Add a TXT record to your DNS:
v=spf1 ip4:YOUR_IP a mx ~allDKIM
Install OpenDKIM:
apt install opendkim opendkim-tools -yGenerate keys:
opendkim-genkey -s mail -d example.comAdd the public key as a TXT record at mail._domainkey.example.com.
DMARC
Add a TXT record at _dmarc.example.com:
v=DMARC1; p=quarantine; rua=mailto:dmarc@example.comVerify
Use online tools like MXToolbox to verify all three records are configured correctly.