Hacking it: Setting up your own Bulk Mail Server — using Sendy and AWS | by Neha M | Level Up Coding

It’s been a while since I wrote a tutorial. life got in the way and all my project ideas took a backseat. but now, in my new job, i was forced to re-evaluate the way newsletters and mass mailings were sent and that’s when i came across sendy. and it’s brilliant: a clean solution and interface for sending mass mail. I have not been hired by sendy to work on this tutorial; I really like this product and I hope the following tutorial will help someone.

There is a very detailed sendy on aws tutorial that I would like to highlight here, without which I would not have been able to even start my project: https://colcol.co.uk/introduction-to-installing- sendy-and-virtualmin -on-aws/ my tutorial varies slightly since I already have a bit of tech experience so I was able to shorten the steps a bit. additionally, i configured on ubuntu 18.04 using a lamp configuration.

You don’t need a very technical background to follow this tutorial, at best, it may be slower to set up. I’ve also added some workarounds and issues I found with the new version of virtualmin and some ways to save money on the ec2 instance.

some points to consider:

  1. You must use the server version of ubuntu to be non-GUI. saves installation space.
  2. tried and tried on the free tier (t2.micro type ec2) but it crashed a lot. other tutorials online say it’s possible but i don’t know if virtualmin updated or shipped or the os but i finally had to switch to a t2.small and it’s working much better. i have left a note on how to start/stop instances automatically so you can save some money there.
  3. you need to have your own domain to configure this.
  4. i have used amazon ses to configure this instead of my own smtp server.
  5. the reason i also chose ec2 instead of maybe a raspberry pi is because aws gives you 62,000 free emails per month if your bulk mail server is hosted on ec2. also, with the pi, you will be responsible for internet maintenance, etc.
See Also:  How to find email sender ip address in gmail

Basically, my company was paying a ton of money to send bulk email. and this is not even in a service like mailchimp; so I can’t imagine how much a full service like that would have cost. therefore, i decided to find another solution that would give me an interface similar to mailchimp, but self-hosted, thus reducing costs.

I found sendy to be a great choice for the frontend because it covers pretty much every feature except the drag and drop html email builder (I found another good solution for this which I’ll add in the tutorial). although they do have a one-time fee, it’s worth it because it means the software is maintained and the creator answers questions fairly regularly on the sendy forums. I also landed buying sendy on black friday and they gave me a nice discount 🙂 so if you’re close to a holiday look for a discount.

basically, sendy is installed on an ec2 instance on aws along with virtualmin as a control panel for the server. aws ses is used as the smtp server to send the emails. this is useful as you probably know that trying to send mass mail from your own email will cause your email to be blocked as it looks like spam. therefore it is important to use a bulk mail smtp server.

Okay, let’s not waste any more time. let’s go into project mode and start with our own mass mail server.

See Also:  Affidavit of Support Under Section 213A of the INA | USCIS

what will you need

  1. a verified aws account: verification can take some time, so plan ahead.
  2. a shipping license: they’re pretty quick to send the details after you buy it online.
  3. I myself use a ubuntu 18.04 computer since most of the work will be done via ssh. if you’re on windows, you’ll need puty installed to access your ec2 instance.
  4. a domain that you own and has access to your dns settings.

scheme of the main steps

  1. create a security group
  2. create an ec2 instance
  3. configure configuration file for your key pair
  4. configure elastic ip address
  5. connect to ec2 via ssh
  6. install virtualmin
  7. create a server in virtualmin
  8. configure ssl
  9. install sendy
  10. set up amazon ses
  11. verify domain in ses
  12. set up cron jobs

optional hints

  1. backup/restore your sendy database
  2. automatically start/stop ec2 instances
  3. use mjml to create awesome html emails
  4. automating sendy backups on aws using snapshots
  5. updating your sendy installation

As you can see, there are a lot of steps, so keep up the pace. sometimes the dns settings take a while to take effect and i would recommend testing the server for a week or so to see how well it works for your needs.

Leave a Reply

Your email address will not be published. Required fields are marked *