Mail servers or services are not like before. In the old days, any administrator will like to install and run their own mail servers. Likewise today, there are still quite a handful doing this. In today’s land, there are 2 options to do this: either commercial methods like using google mail servers or installing dedicated server software. The most common commercial mail software is microsoft exchange servers and the alternative is sendmail.
Opting for the opensource method would be most ideal for most administrators. This will include installing www.dovecot.org or www.microsoft.com exchange server. My view is the setup and maintenance being horrendous and unmanageable if you are an SME. I personally prefer some open lightweight solutions. I will still advise mail servers to be installed on a separate server by itself. It has a high chance of screwing up your configs.
Google Public Apps for Business
So what is advisable? Before you start, make sure you have a domain name, something like myfirstwebsite.com. You can purchase one from large domain registras such as www.godaddy.com, www.register.com or even google themselves sell domains.
When you have a domain, use Google Apps to host 50 free email accounts. Effectively its a personal mail server that hosts (xxxxxx@yourdomain.com) 7gb free, upgradable to 25gb. Mine is a small development group so 50 is enough. If you are running a medium to large company considering to pay google per account to sort out the problems may be an option or using dovecot setups. Lets focus on the SME approach. Go to Google Apps Standard Edition: http://www.google.com/apps/intl/en/group/index.html
Follow googles instructions of setting up the environment. There will be a point you will have to configure your mx records. Google requires to validate domain so you will have to place html files into your ftp or change cname. Just do the html method.
When you are adding MX records, place in your purchased domain and googlemailservers as mx record. TTL 300, priority as defined.
Notes
- In setting up the valid domains for google apps for business, you might find it easier to use the html method. If you upload the file on to your server to be hosted and its not displaying, most of the time is your permissions problems. While on your own server, in your command line do > sudo ls -l and see if the group of the file is www-data and your user is part of www-data group.