Skip to content

Instantly share code, notes, and snippets.

@peteristhegreat
Last active October 27, 2022 15:21
Show Gist options
  • Save peteristhegreat/5092f8cf1df4fe21f156dd7715fc9b80 to your computer and use it in GitHub Desktop.
Save peteristhegreat/5092f8cf1df4fe21f156dd7715fc9b80 to your computer and use it in GitHub Desktop.
AWS ec2 SMTP + MX setup, Postfix, Postgres, Dovecot, Letsencrypt, Roundcube

Introduction

Running an SMTP server on a linux box should be pretty straightforward, right?

PHP hosting sites would just offer it as a free add-on for most sites... it can't be that hard.

AWS Managed Service

4$/user/month (as of 2022Q4)

https://docs.aws.amazon.com/workmail/latest/adminguide/howto-start.html

AWS Marketplace FloatingCloud preconfigured Postfix AMI image

https://aws.amazon.com/marketplace/pp/prodview-7lthtvl7jhclu#pdp-usage

https://github.com/montgomery-auber/postfix-containerized

https://github.com/cloakmail/postfix-pg-docker

DIY, Setup an EC2 instance to do it

https://speedkills.io/email-server-aws/

ec2 instance install postfix + letsencrypt + dovecot + roundcube and other things to get a ubuntu system to handle MTA and SMTP with a basic webmail client with it.

https://www.atlantic.net/vps-hosting/how-to-set-up-fully-featured-mail-server-with-postfix-dovecot-and-roundcube-on-ubuntu-18-04/

missing documentation, but at one point was good:

https://github.com/Avix101/Mail-Server-Script

https://stackoverflow.com/questions/31770064/setup-postfix-smtp-on-amazon-ec2

Postfix alternatives

There are other options, but postfix is the one that comes up first for ubuntu...

iRedMail

https://docs.iredmail.org/install.iredmail.on.debian.ubuntu.html

https://github.com/iredmail/dockerized

MailCow

https://github.com/mailcow/mailcow-dockerized

Notes on SES and MX records in AWS

https://docs.aws.amazon.com/ses/latest/dg/receiving-email-mx-record.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment