How to configure another droplet to send emails?

May 22, 2014 1.2k views
I have 2 droplets. The one is a mailserver and the other one is the one that has the website which is wordpress. How can I configure the wordpress/droplet to send eimails from the mailserver? I would like a full answer please meaning, what do I need to install and how to configure on both droplets, what ports to open for firewall and what records to add in DNS. Thank you.
1 Answer
I use Exim4 on my droplet with WordPress/PHP websites:

That is so that my droplet can send emails.

Then for my second droplet, my mail server, I use iRedMail:

Both tutorials are very easy to follow, and iRedMail comes with everything fully set up. Though with the nature of antiviruses, Clamav and SpamAssassin take quite a bit of resources so you should deploy with at least 1GB memory (the $10 droplet). You can do with much less RAM, but that's only if you're willing to dig into your configs and remove certain packages from your installation. Otherwise, iRedMail runs very smoothly with the required 1GB.

So for your DNS, you'd do something like this:

A record:, which points to your mail server's IP address.
MX: with a high priority (low number, can be anything. I use 5).

And a TXT record: with its text being something like: "v=spf1 ip(wordpressdropletsIP) ip(mailserverIP) ~all"

Replace (wordpressdropletsIP) and (mailserverIP) with actual IP numbers, without the brackets.

That's all that's really needed. The entire process will take less than 30 minutes, unless you run into any trouble. Also, Google will help for anything if you need to find some quick information on something specific. Or just post here.
by Pablo Carranza
Due to the popularity of Gmail, Google Apps,, Yahoo! Mail & a myriad of other providers, many cloud-server users mistakenly fail to install a mail server, initially. However, humans are not the only ones that send electronic mail. If fact, many Linux server applications also need to send email. This tutorial will review how to install a send-only mail server on Ubuntu 12.04.
Have another answer? Share your knowledge.