1

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 mydomain.com 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 mydomain.com 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)-

1 Answer 1

2

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.

5
  • 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. Mar 22, 2014 at 16:28
  • 1
    In the same way that you need an A/CNAME record set in your DNS provider so that browsers going to your example.com 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 mail.example.com (and then you also add an A record for mail.example.com pointing to your mail server's IP address) Mar 22, 2014 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? Mar 22, 2014 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 example.com 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. Mar 22, 2014 at 17:01
  • 1
    Also you can add several ordered MX entries so you can have backup mail server(s). Mar 22, 2014 at 17:02

Not the answer you're looking for? Browse other questions tagged .