0

I recently set up my own mail server using postfix as MTA and dovecot as an imap 'server' (is this the right term?). Now dns records is the last thing to do and I was wondering if I understood this right. Suppose my domain is: mycomp.com.

Postfix and Dovecot use a certificate generated for mail.mycomp.com and should lastly be reachable by that subdomain. Therefore I need to set up two records one mx record for mycomp.com that points to mail.mycomp.com and an A record for mail.mycomp.com that finally points to my server ip. Would those be the proper dns records?

schgab
  • 105
  • 3

2 Answers2

1

The relevant DNS records (let assume example.com domain ):

example.com. IN MX 10 mail.example.com.
example.com. IN TXT "v=spf1  ..."
mail.example.com. IN A 192.0.2.10
mail.example.com. IN AAAA 2001:db8::10
mail._domainkey.example.com. IN TXT "v=DKIM1\; ..."

10.2.0.192.in-addr.arpa. PTR mail.example.com

0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa. IN PTR mail.example.com.

Mandatory is MX for example.com and at least A for mail.example.com. Optional but more than recomended to not be marked as spam (one of the requiremetns) is PTR record (reverse DNS record for the IP).

Other optional records are TXT SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail) depends which level of trust you would liek to have.

Kamil J
  • 1,587
  • 1
  • 4
  • 10
  • Thank you. I understood the DKIM, SPF and PTR part and set it up accordingly. Mail Tester gives a score of 10/10. Perfect. One last question: What is the AAA record doing? – schgab Feb 13 '20 at 05:32
  • Oh I see it is indeed the ipv6. – schgab Feb 13 '20 at 05:36
0

Yes the records are correct. But you also need a PTR record for your_server_ip to mail.mycomp.com

Almost all mailservers check name->ip and ip->name and if both names match for spam filtering...

Virsacer
  • 608
  • 4
  • 14