Mail Server and Web Server as same droplet?

January 21, 2014 10k views
I'm wondering if it's a bad idea to use the same droplet for a web server and a mail server? This wouldn't be a heavy traffic situation so I imagine it would be OK but I just want to check. Also, is it possible to have the mail server for more than one URL on the droplet? I'm hosting a few different sites with different domain names and would like to keep everything on just one droplet. I'm using LAMP on Ubuntu 12.04 on a 1GB/1CPU 30GB SSD Disk 2 TB Transfer
3 Answers
It's fine to run web and mail services on the same server, provided it can cope with the load. There are situations in the wild where it is appropriate to separate your services across multiple servers, but I wouldn't do it unless you know loading will be an issue (or you have other motivations). From your description it sounds like a single server will be sufficient. You can always upgrade your instance or split your services out to more servers in the future if you need to.

You haven't specified what mail services you want to run or the mail server software you'd like to use, but I know that Postfix SMTPd supports receiving mail for multiple domains. This Ubuntu help page goes over how to set up Postfix with IMAP, POP, forwarding, and multiple domains:

Thanks Stephen! I'll take a look at that today. Just decided to go with LEMP instead of LAMP so I'll set that up and then move onto this Postfix setup.

Is Postfix able to be accessed via a nice GUI interface (similarly to webmail on various shared hosting platforms) like http://sitename/webmail and then accessing either, Horde, Roundcube or what-have-you?
Postfix is just an SMTP server; it doesn't provide any services other than sending and receiving emails Horde and Roundcube are IMAP clients, so to use those you'd need to set up an IMAP server. The article I linked before shows how to set up the 'Courier IMAP' program, but there are other options. Dovecot is a common IMAP server:


If you just wanted email to some addresses to be forwarded to another address, this can be done only using Postfix (see the bottom of that page I linked yesterday).
Have another answer? Share your knowledge.