How can I run one mailserver on one droplet to handle mail for three (or more) different domains?

Posted April 11, 2015 3.2k views
Ubuntu Email DNS

My droplet is Ubuntu 14.04. Virtual hosts on Apache have been setup and work fine (even with Ghost self-installed!). I am wanting to set up an email server, likely following the tutorial here for iRedMail or Postfix et al.

I am however confused by how to set up a FQDN for one email domain when I have multiple domain names on one droplet, the same droplet I will install the mail server on.

When I check hostname I get the name of my droplet, MyDroplet. When I check /etc/hosts I see localhost MyDroplet

Now, I have read all the other questions about FQDN but I haven’t been able to understand if the answers apply to my setup since I (apparently) did not see a similar setup.

I have one droplet, with its IP,, and the droplet’s name MyDroplet. I have and and even

So the question is how can I run one mailserver on one droplet to handle mail for three (or more) different domains?

Thank you!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

This is a great article that covers the pros and cons of running a mail server that also includes guides at the end for various mail servers that will help you run a mail server for multiple domains:

by Mitchell Anicas
When setting up a web site or application under your own domain, it is likely that you will also want a mail server to handle the domain's incoming and outgoing email. While it is possible to run your own mail server, it is often not the best option for a variety of reasons. This guide will cover many of the reasons that you may not want to run your own mail server, and offer a few alternatives.
Submit an Answer