I'm a little confused with initial DNS setup for own (self-hosted) mail server. To make it clearer, I'll explain it with an example.
I have a virtual machine with Debian. Hostname is mail01.mydomain.com (maybe one day I will need to create mail02, mail03...), IP is 123.123.123.123
What do I need to specify in DNS records as hostname (everything is clear with the IP)?
Hostname of the system (mail01.mydomain.com)? Or frequently used mail.mydomain.com (or mx.mydomain.com)?
What hostname should I specify in the PTR record in this case? mail01.mydomain.com or mail.mydomain.com?
What name to use in settings Postfix/Dovecot? mail01.mydomain.com or mail.mydomain.com?
P.S. Simply put, is it necessary for the real name of the system (hostname) to match the name specified in the DNS records (A and MX) and what should the name in the PTR record be in this case?