Live data from Hacker News

A serverless email server on AWS using S3 and SES

github.com

11–20 of 266 posts

Re: A serverless email server on AWS using S3 and SES

#11

I don't know anything about serverless --- to this day I fail to understand what this word is even supposed to mean. And the deployment diagram[1] sure looks complicated to me. I think I prefer old-school servers. [1]: " rel="nofollow">https://raw.githubusercontent.com/0x4447/0x4447-product-s3-e...

The term serverless is such a misnomer. While this is a cool project, you'd use 3 different servers at a minimum here.

It's pretty well understood by now that serverless is meant to connote that you (the firm owning the application) don't manage the server(s). Someone else does it while you just bring your application code.

Re: A serverless email server on AWS using S3 and SES

#12
> This stack was created out of frustration due to the fact that to this day there's no easy way to have a full email server without the overhead of installing and configuring all servers needed to handle incoming and outgoing messages.

Interesting approach, though I solved this frustration by the use of a Docker and kept "my data is mine" + "no vendor lock-in" + "I control all the gears" approach. (Though, it's not perfect since VPS is ran by "someone" else.. but that place where you run this stack can be easily changed at your convenience). Simple docker-compose.yml with 3 images and voila.

This AWS S3 SES setup looks far more complex than what I did using only 3 docker images: the postfix (for smtp), dovecot (for imap), opendkim (for email sigining & verification). It's really easy to fire-up a VPS with a single click nowadays.

If someone is interested in the images I am using:

- https://git.nixaid.com/arno/postfix

- https://git.nixaid.com/arno/dovecot

- https://git.nixaid.com/arno/opendkim

Then you just feed the images with the right configs (main.cf, master.cf, .., dovecot.conf, opendkim.conf).

It's also possible to template the configs and make the variable-based configs. Make things scale friendly. I am also using Terraform to automate the server deployment/DNS record updates so it is easy to get from 0 to 100.

The only drawback is that you are the one to maintain the OS/SW upgrades, security, etc.. but that's something I really want to do by myself instead of relying on someone else :-)

Re: A serverless email server on AWS using S3 and SES

#13

Thanks for putting this together and documenting it so well. I’ve had to build this solution twice now, and far less elegantly. The S3 PUT charges caught me off guard the first time (receiving lots of marketing/spam email will cost $1/1000 emails). I ended up putting small emails up to 400 kB in dynamoDB and only using S3 for large emails and attachments, which could be a means of cost reduction in this solution as w…

Honest question: how did you arrive at 1$/1000 mails? When I look at S3 peicing it says 0.005$/1000 PUTs.

Are there a lot of requests made or am I missing something else?

Re: A serverless email server on AWS using S3 and SES

#14
post #12

> This stack was created out of frustration due to the fact that to this day there's no easy way to have a full email server without the overhead of installing and configuring all servers needed to handle incoming and outgoing messages. Interesting approach, though I solved this frustration by the use of a Docker and kept "my data is mine" + "no vendor lock-in" + "I control all the gears" approach. (Though, it's not…

Do you mind writing a blog post somewhere explaining to noobs how this can be done?

This will be a great post with lots of traffic I imagine!

Thanks, great work!

Re: A serverless email server on AWS using S3 and SES

#15
post #12

> This stack was created out of frustration due to the fact that to this day there's no easy way to have a full email server without the overhead of installing and configuring all servers needed to handle incoming and outgoing messages. Interesting approach, though I solved this frustration by the use of a Docker and kept "my data is mine" + "no vendor lock-in" + "I control all the gears" approach. (Though, it's not…

Do you mind writing a blog post somewhere explaining to noobs how this can be done? This will be a great post with lots of traffic I imagine! Thanks, great work!

I am actually thinking on writing it since long ago... But not motivated enough... :/

Re: A serverless email server on AWS using S3 and SES

#17
post #12

> This stack was created out of frustration due to the fact that to this day there's no easy way to have a full email server without the overhead of installing and configuring all servers needed to handle incoming and outgoing messages. Interesting approach, though I solved this frustration by the use of a Docker and kept "my data is mine" + "no vendor lock-in" + "I control all the gears" approach. (Though, it's not…

> The only drawback is that you are the one to maintain the OS upgrades, security, etc

Since you are running everything in docker this could probably be made easier by using a slimmed down distro with automatic updates.

You'll still need to make sure your docker images are updated and patched though.

Re: A serverless email server on AWS using S3 and SES

#18
post #11

Earlier quoted context omitted.

The term serverless is such a misnomer. While this is a cool project, you'd use 3 different servers at a minimum here.

It's pretty well understood by now that serverless is meant to connote that you (the firm owning the application) don't manage the server(s). Someone else does it while you just bring your application code.

Correct. It is a misleading term, imo.

Re: A serverless email server on AWS using S3 and SES

#19

I don't know anything about serverless --- to this day I fail to understand what this word is even supposed to mean. And the deployment diagram[1] sure looks complicated to me. I think I prefer old-school servers. [1]: " rel="nofollow">https://raw.githubusercontent.com/0x4447/0x4447-product-s3-e...

Serverless: Somebody else's server

Re: A serverless email server on AWS using S3 and SES

#20

I don't know anything about serverless --- to this day I fail to understand what this word is even supposed to mean. And the deployment diagram[1] sure looks complicated to me. I think I prefer old-school servers. [1]: " rel="nofollow">https://raw.githubusercontent.com/0x4447/0x4447-product-s3-e...

The benefits to using this approach over a traditional server are: 1. Someone else maintains the software running these services, including OS upgrades, security upgrades and patches, uptime monitoring, etc. 2. Since every logical component is an independent service, each scaling independently, any one single component is unlikely to become a bottle-neck while scaling. In traditional monolithic servers, you'll have t…

This mentions that they're using S3 as the interface, and I'm not sure if SES provides POP/IMAP support for your email clients.
Post reply on HN