DNS Records Configuration - Email Going Straight to Spam Box?

I know that in order to hit the inbox, the main DNS records need to be properly set up. These are the main DNS records that every mail delivery system should have for their domain:

  • TLS
  • A
  • MX
  • DKIM
  • SPF
  • DMARC
  • rPTR

The ones that I mainly need help with configuring right now are the following records:

MX, DKIM, & SPF.

I have iRedMail installed on my domain at: aaronsnewsletters dot com

What exactly should I set for the MX records if I set my main mail server to mail.aaronsnewsletters dot com?

Am I supposed to set the MX records for the root/apex of the domain or do I set them to aim at the "mail.aaronsnewsletters dot com"?

Also, what about the DKIM & SPF?

Am I supposed to try pointing at the root/apex or the subdomain with the "mail."?

Any support is greatly appreciated.


Generally:

MX records tell people how to reach your email server. You need to point your MX record to wherever you want people's email servers to send email to.

SPF records tell people who is allowed to send email as you. You need to include any mail servers that are allowed to send email on your behalf.

DKIM records tell people what your signature looks like and let them verify someone signed your emails with your signature. You need to create a public/private keypair, take the PUBLIC key and create DNS records for it, and how to find the key, and then setup DKIM signing on your mail server. This can be tricky, and the method of getting your mail server to sign messages is very dependent on how you're sending email.

If you are setting up DKIM, you should also be setting up DMARC, which tells people what to expect from messages claiming to be from you, and what to do if that's not the case.