I've recently taken on a VPS (Ubuntu 12.04) to host a few websites (with domains) and have recently set up Postfix/Dovecot to act as a mail server for the sites as well. The name server records are pointing to my registrar's nameservers.
I have a few domains (domain1.com, domain2.com, domain3.com) with their A records pointing to the IP of my VPS, which I've set up with name based virtual-hosts for apache.
I imagined that once it was set up correctly, I would be able to enter mail.domain1.com as my pop3/imap/smtp mail server on an email client, along with my username and password. It would be fine for this to be the same for the other domains too.
Could someone tell me what the correct A and MX DNS records should be for this and how I should set my hostname on my vps and in settings for postfix/dovecot?
For instance I've set my vps hostname as domain1.com and I put the same in the postfix/dovecot config, but wondered if I should have put mail.domain1.com? Do I set CNAMEs for mail, imap, pop, smtp to point to an MX record or an A record so that the server can be reached at all of them?
Many thanks for any help you can offer :)