Live data from Hacker News

A serverless email server on AWS using S3 and SES

github.com

181–190 of 217 posts

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

#181

Earlier quoted context omitted.

In cost? Running postfix.org mail sever on a VM must have a nonzero cost, with the additional need to maintain the underlying OS.

EC2 micro instances are free.

but are often blacklisted as SMTP sources, unfortunately.

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

#182
post #80
post #74

This is awesome & I totally intend to play with it :D Do you have any plans / any ideas on feasibility to plop an imap server on top of the s3 store? I have really wanted a serverless aws solution and this moves the needle on work I did not wanna do so I’m reinterested again. Something like an s3 object change -> dynamodb index might work well for latency concerns and keep the serverless spirit alive. I just have suc…

At that point why not use Amazon WorkMail[0]? Then you don't have to maintain anything at all. 0. https://aws.amazon.com/workmail/

Workmail doesnt have wildcard addresses and you pay per address which is why I was looking at something like this.

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

#183
post #143

This is as "serverless" as gmail. SES is literally Simple Email Service. Now do that without SES.

| Now do that without SES. Why, so they can prove they know how to host an email server? That’s not the point of the OP.

So they can say it's their service. Using somebody else's email service isn't their "serviceless". Of course there is a question of where you draw the line. But IMHO, using somebody's email service is that line here. Otherwise it's not far from using gmail or aws WorkMail for that matter.

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

#184

I'm a little bit disappointed by the solution of this article. They start with: "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." Ok, so the point is that it is too complicated/frustrating to deploy an email server. But look at their…

When all you have is a hammer …

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

#185
post #104

This is a brilliant architecture. Everyone here talking about no email clients, IMAP and AWS restrictions is missing the point. Although you could use this as a personal account, or as a company. This fully automated system is a perfect ground layer to a number of applications with a very cleaver API. Say you are a small startup, and you will need some email functionality? Give your web server access to writing to ou…

> Give your web server access to writing to outbox and you can send email.

SES is already in the mix, so why not just use it directly to send emails from your web server?

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

#186
post #174

Earlier quoted context omitted.

Yes, I used something like that as well. But, are you sure you can set "From" header to anything(even for email/domain that aren't verified with SES). So that on receiver side(gmail for example) it will show the original sender. In my account(in production mode, not being sandbox), I couldn't. When I attempted to set "From" header(or "Return-Path") I got these error 554 Message rejected: Email address is not verified…

No, you can't set it to anything, you'll fail DKIM/DMARC/SPF. Just leave it as it is! You just wrap the original email in an 'envelope' with envelope-to (you @ other provider) and envelope-from (whatever @ verified with SES). You can see this here, if it helps at all, though it's a bit DSL-y: https://github.com/OJFord/amail/blob/c602f4d36c1bb9df4da1744...

I download and run your Rust code. And apparently it's same as others. You cannot set the FROM header to any value, therefore cannot forward the email as it's by retaining the original header.

  thread 'main' panicked at 'Failed to send test: Permanent(Response { code: Code { severity: PermanentNegativeCompletion, category: MailSystem, detail: Four }, message: ["Message rejected: Email address is not verified. The following identities failed the check in region US-WEST-2: random@gmail.com"] })', src/main.rs:41:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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

#187

This is great but it's a bit misleading. It only store email on S3, that mean you cannot read email with your email client. Seem thing with outgoing, you upload email to s3 in a certain format to be send out, not smtp protocol This is more like an API for sending and receiving. You cannot say generate SMTP credential and drop in your mail client. Also, one of the limitation with AWS SES is you cannot sent FROM or RET…

You could probably cobble together a POP server on top of S3 pretty easily (e.g. using something like https://github.com/femto113/node-pop3-emitter which I threw together a couple years ago for a related purpose). I'm not sure if you can get it to work in Lambda though because the POP3 protocol needs sockets, but you could definitely get it to work in a simple container in Fargate (so still "serverless").

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

#188
post #28

Earlier quoted context omitted.

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.

To which I honestly, just kept my mouth shut and stood aside. I can never keep my mouth shut in these situations. Sometimes it leads to promotions, but I suspect it puts a ceiling on how high I can climb the corporate ladder.

Spent the first 10 years of my IT career driving towards greater control over the systems we managed, because "the reason the service is down is that someone else (usually a vendor) didn't do their job" was never an excuse. The last 5-10 years I've found myself ceding more and more control to cloud service vendors (like Microsoft). Less work for me ("raise a premium case"). Less stress too ("they're working on it, nothing for us to do"). Now I finding myself hoping I'll be retired before the pendulum swings back again.

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

#190
post #106
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 has become a stupid marketing term, just like Facebook hijacked the words “Friend” and “Like”. I look forward to true serverless software - that is either peer to peer or uses a distributed back-end with encryption. Now THAT is the future! Serverless just means “we spin up a server for you”, similarly to how “the cloud” is just a euphemism for “extreme centralization of hosting myriad clients under the con…

It's more than that, slightly. A "serverless" application doesn't have a specific piece of hardware supporting it except in the context of a single operation. The hardware is all abstracted away and allocated from a pool on demand. I suppose it comes from "serverless architecture", where there are just other distributed services (not specific servers, virtual or otherwise) executing your code.

I agree it's not a term well suited to its popular use, but such is life. Commercial interests are constantly mucking up the language to suit their own ends. E.g. Discord is abusing the term "server" to mean a virtual meeting space. "Organic" w.r.t. food has a really contrived official criteria, unlike in chemistry. Regular people muck up the language in frustrating ways, too. See "literally".

Post reply on HN