Skip to main content

Docker Mailserver in AWS

·347 words·2 mins

Info

This post was imported from a personal note. It may contain inside jokes, streams of consciousness, errors, and other nonsense.

For whatever reason I’ve decided now I want to tackle hosting my own mail server. I’ve been using a Lambda which forwards email from a vanity domain to a gmail address for years but it’s been annoying because the from address is always no-reply@.... It’s a limitation of SES (actually a countermeasure against spam) that I can’t use the actual sender’s address in the from field. Best I could do was put the sender’s address in the reply-to field and that was kinda good enough for a while sorta.

Sometimes you can see the weird email addresses in my replies / forwards which is not nice. People I forward messages to (and also people I reply to?) see it, too. Worse, though, I can’t block some spam senders because it would block everything from no-reply which is, well, everything.

So.

Docker Mailserver looks great and they have a nice introduction. https://docker-mailserver.github.io/docker-mailserver/latest/introduction/

Now I’m deciding how to host it.

I looked at VPC possibilities: good old Linode which I used, what, 15 years ago? Hertzner came highly recommended but their data centers are both in Germany. So I came back to AWS since it’s what I know (knew?) and my domain is already hosted there, along with my journaling application.

So.

I created a separate Organizational Unit for it and just a Prod AWS account. I figured out that Single Sign-On service was what I used to use to assign permissions to those accounts to users and that the new name for it is IAM Identity Center. This stuff is definitely targeted at bigger organizations cuz wow, there are way more layers of granularity than I need.

Created a cluster in AWS ECS service but I’m a bit lost for creating the service. Maybe better to start off with an EC2 instance, SSH into it, and then I can setup the mail server manually for now. Later I can figure out how to do it with ECS.