Does anyone know of a tutorial that takes me from having registered a domain name (with eNom through Google) to a running IMAP mail server (preferably based on Ubuntu) connected to the internet via a ADSL connection? I am looking for something quite specific if possible as I have very little experience with mail related issues.
So I have tried to follow the instructions in the answers below (and a few places on the net). I have done the following:
I have used my enom control panel to delete the existing records created by Google Apps for domains and created (only) the following records (IPs are fake, I have a static IP from my ADSL provider which I have used):
@ 220.127.116.11 A-record
www 18.104.22.168 A-record
@ example.com. MX-record
mail example.com. MX-record
I have forwarded port 25, 110, 143, 993 and 995 from my router (a Netgear WNR2000) to my mail server (Mail Station on a Synology CS-407).
I cannot receive any mails but I can send them without any problems. What am I missing? As a test I have also tried forwarding port 80 while running a simple webserver on my mail machine. If I try to access my domain from a web browser I am prompted to log into my router. There is no firewall running on my router.
Got it working by inserting a second MX record referring to my ISP's backup SMTP server with a pref of 20 (my own has pref 10).