Live data from Hacker News

A serverless email server on AWS using S3 and SES

github.com

31–40 of 217 posts

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

#32
post #22

A serverless server? It is a great illustration of how the term "serverless" has shifted from literally no server (ex: sqlite database) to "somebody else's computer".

My understanding of it has been "look, I reinvented cgi-bin."

Is cgi-bin highly available and will someone else have to wake up at night if it crashes?

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

#33
post #22

A serverless server? It is a great illustration of how the term "serverless" has shifted from literally no server (ex: sqlite database) to "somebody else's computer".

I was doing serverless pages back in late 90s when I uploaded PHP scripts to "website providers".

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

#34
post #28
post #22

A serverless server? It is a great illustration of how the term "serverless" has shifted from literally no server (ex: sqlite database) to "somebody else's computer".

I literally had one of the heads of a crucial flight system project loudly exclaim to me in front of the senior managers. "It's serverless - there is no server!" To which I honestly, just kept my mouth shut and stood aside.

Maybe what he meant is "there is no server that we are responsible for", which is where the benefit lie for them.

(not commenting on the "serverless" name for what used to be called "mutualised services"…)

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

#35
This is really interesting! Currently trying to solve a similar problem thing myself, so having a look through to learn from your solution.

I'd recommend having a look at AWS CDK to manage the AWS resource creation, is much nicer than raw CloudFormation: https://github.com/aws/aws-cdk/

For my solution to this I've also then got a frontend ontop of my backend to setup view mailboxes, email list per mailbox, email viewer (read/unread status), and email sending. I'm doing the same with S3/SES/Lambda + DynamoDB for email sending/recieving/processing + email metadata in DynamoDB. Mine is currently WIP and needs some real auth (using a URL API key, not the most secure...) + email replying + tidying up. Will definitely open source my solution and post to HN when ready.

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

#36
post #22

A serverless server? It is a great illustration of how the term "serverless" has shifted from literally no server (ex: sqlite database) to "somebody else's computer".

> serverless server?

This isn’t a contradiction. “Server” is an overloaded term and the “server” in “serverless” refers to a different meaning of “server” than the “email server” bit. “Serverless” means there is no physical or virtual hosts to manage, you just supply the request handler i.e., the email server. It's amusing because it sounds like a contradiction, but it's not one.

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

#37
post #25
post #8

Earlier quoted context omitted.

SES supports using SMTP to send emails - so I don't know why this particular setup would prohibit that. https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-e...

> This flow was designed to take advantage of the S3 trigger system and break each action into a small Lambda. The email flows from S3 => Lambda => SES so the underlying design seems to prohibit sending of emails directly from SES. It sounds like SES could still be used directly, but you then need to add in authorization and user management if you're accessing it externally. It's a cool project and I can envision it…

AFAIK Amazon provides no guarantees that s3 file triggers will actually run, though they 'probably always will'

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

#38

This is really interesting! Currently trying to solve a similar problem thing myself, so having a look through to learn from your solution. I'd recommend having a look at AWS CDK to manage the AWS resource creation, is much nicer than raw CloudFormation: https://github.com/aws/aws-cdk/ For my solution to this I've also then got a frontend ontop of my backend to setup view mailboxes, email list per mailbox, email view…

I'd love to see a fork/branch that does the same as the linked repo, but using the cdk for comparison.

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

#39
post #13

Earlier quoted context omitted.

> Guess that will gradually take AWS IPs out of all those mail blacklists. Are you thinking of EC2? SES has never had a problem with this in my experience. Regarding verification, you can verify any email address where you can receive a link long enough to click on it. Domain validation is only needed if you want to send mail from arbitrary addresses without that step.

Individual SES IP's have been [temporarily] blacklisted before. We hit this issue earlier this year with one spam filter/service, and you can find plenty of past examples in the SES forums. e.g. https://forums.aws.amazon.com/thread.jspa?threadID=233001 https://forums.aws.amazon.com/thread.jspa?threadID=323992

Sorry, I should have said significant problems. If you send email on anything like a large-scale basis you’ll get on some kind of blacklist at some time – all you need is one user sending email to someone with a twitchy spam reporting reflex. What I was thinking about, though, is that it’s usually transient – e.g. out of hundreds of thousands of emails I’ve never had one bounce that way instead of being delayed, which is better then self-hosting on a long-time class B over a similar timeframe.

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

#40
I was trying to set up Amazon Cognito (an authentication service) recently which basically needs a verified email address to send users emails for user verification and password reset, and I was shocked that Amazon has no basic email hosting service. Of course it’s easy enough to work around for my use case, but I was surprised nonetheless.
Post reply on HN