Setting up MX records and domains for a VPS through Third Party
I have tried looking through multiple guides, topics, etc., on various sites, and can't find anything that walks you through my specific issue.
I have a VPS running Ubuntu Server 18.04 LTS with a LAMP stack with SFTP and SSL. My Domain is being handled by GoDaddy's nameservers. What exactly do I need to set to make sure the mail server I am setting up on my VPS works correctly?
I have my www CNAME record and my @ A record pointing towards the VPS (I can connect to the website on the VPS without issue).
To setup the mail server with an FQDN of mail.mydomain.com, what MX, A, and/or CNAME records would I need to setup to get things working properly. This is my first time setting up a mail server, and all guides I've checked just discuss how to install and setup the applications (postfix, dovecot, getmail, etc), but not what prior steps to take before do those steps. Like the best guide I found says to have the FQDN set to mail.mydomain.com, but doesn't talk about how to set that FQDN up properly first (i.e. since I already have /var/www/mydomain.com/ for my website hosted on the box, what do I need to do to configure the mail.mydomain.com before installing the mail server stuff?).
Any help would be appreciated, and I apologize for the wall of text.