Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A little of my own background,

I'm a webdeveloper and used to the likes of shared hosting, at my new job I have become accustomed to working with our own servers (running CentOS) and the Linux command line.

Because of this, I feel that it is a normal step forward for me to approach a similar solution outside of work, I've grown out of shared hosting and simply want more control over my applications.

I have been looking at a few VPS solutions, read some reviews, and I now feel confident to take on one of these services and migrate my applications.

I have been using my own .com domain for years now when it comes to email, and I would prefer to keep using it after I migrate my applications over to VPS, therefore my question is: How should I approach email in a VPS solution?

I've looked around, and there seems to be some collective fear around the web when it comes to setting up your own mailserver, the best information I have found:

  • Get the DNS for updated to point the MX record/s to your server;
  • Install the MTA of your choice (I recommend postfix, of course);
  • Configure the MTA to receive mail from and deliver to local mailbox/es;
  • Install the MDA of your choice (I recommend dovecot, of course);
  • Configure the MDA for POP/IMAP access;
  • Set up your MUA to retrieve/synchronize the mail.

This is overly confusing for someone with my level of knowledge.

Is this the correct way to approach email? (and if so, is there a better/extensive guide on how to accomplish this?) Or Is there something "easier" that I can do? (keeping in mind I don't want anything extremely fancy, just be able to send and receive emails, some sort of webmail software would be nice too)-

share|improve this question

closed as off-topic by dawud, Jacob, Ward, Jenny D, Scott Pack Mar 23 '14 at 16:11

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Jacob, Ward, Scott Pack
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

Getting started with email is relatively easy, the hard part is the maintenance (fighting spam, configuring accounts etc), that's why many people decide to just outsource mail.

The steps are a bit easier than what you outlined in my opinion, it looks like:

  • install Postfix and Dovecot (apt-get or yum is enough)
  • configure Postfix to accept your domain, add an account (Linux account the easiest), there's nothing special to configure for dovecot
  • do basic test (you can email to an IP) and finally change the MX record

Easy that this may be to get a pre-built image of a Linux mail server ready to go (depends on host provider). I'd stay away from proprietary software control panels.

share|improve this answer
Hi, thanks for the information. Could you elaborate on this MX record? Or where I could find (reasonable) information on this? I know, I know, google is my friend! But it seems everyone has a different thing to say when it comes to mailservers. – Jorg Ancrath Mar 22 '14 at 16:28
In the same way that you need an A/CNAME record set in your DNS provider so that browsers going to your web site can resolve the IP address of the server, you need to add a MX record to tell mail servers where to send email to your domain; in your DNS server you add a MX record like (and then you also add an A record for pointing to your mail server's IP address) – LinuxDevOps Mar 22 '14 at 16:34
Understood. Stay with me now, we might just make this understandable for all the server morons like myself out there: The moment I add an MX record in my registrar DNS settings, will this stop emails from reaching my old inbox? – Jorg Ancrath Mar 22 '14 at 16:45
If you are receiving emails for your domain you already have an MX record (you can check it from Linux with dig MX ). As soon or a little after you change the MX record, mail will start arriving at the new server, same as with a regular "A" (domain to IP) record. That's why you want to do this step last. In any case mail is a it forgiving in the sense that if you make a mistake and your mail server doesn't work, other (most) mail servers will keep trying to send email for a few days so you won't lose messages. – LinuxDevOps Mar 22 '14 at 17:01
Also you can add several ordered MX entries so you can have backup mail server(s). – LinuxDevOps Mar 22 '14 at 17:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.