Best practice SMTP in multi droplet setup

February 11, 2016 994 views
Scaling DNS DigitalOcean Articles Ubuntu

I've been following the DigitalOcean articles to create a new setup with single responsibility droplets. In the current setup we've got 2 load balancers, multiple application droplets and 2 database servers. Similar to the first diagram in the floating IP tutorial:

For our next step in this setup we'd like to add a mail server to send mails for our applications. Like no-reply mails after having registered on a website. I got my droplet set up with Postfix being able to send mails to my Gmail box.

The actual problem: I'd like to 'white label' my outbound mails with our floating IP. It is important for us to have a static IP for mails for whitelisting purposes at clients. Most tutorials I've found so far talk about proxying inbound mail, using NAT in the router or running Postfix on the load balancer. Especially the last option seems like a bad practice considering it would put some extra strain on a droplet which should be as clean as possible (imo).

What would be the practice for us?
In summary our wishes:

  • Be able to send bulk mails (4000 at a time)
  • All mails should have the floating IP (or other static IP) as source
  • Single point of configuration for mailing
  • Be able to send mails for multiple domains
Be the first one to answer this question.