How to point MX record to my VPS

I own a domain and I host a website on github pages. My A record points to github. I'd like to host mail on a VPS (which only has an IP address), but apparently, I cannot use an IP address as an MX record. How should I proceed?


While technically you can point an MX record to an IP many places won't let you so just create an A record called mail and point it to your IP for the domain and then point the MX record to that.