Live data from Hacker News

A serverless email server on AWS using S3 and SES

github.com

161–170 of 217 posts

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

#161
post #33

Earlier quoted context omitted.

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

Different thing though. When you uploaded your PHP script, you uploaded it to a single server, and it ran on a single server. Unless your provider were doing some kind of load balancing (doubt it). With serverless you upload your 'script' to the 'cloud' and then it will run on any number of servers, usually assigned to one when it dry-runs. Then it'll unload from the server afterwards. And therefore unless you have a…

At least with Mediatemple’s shared hosting, they had a “grid” service that would host your site on a cluster of servers and claimed to be able to handle large bursts of traffic.

It worked because each page request ran a complete cgi php script to generate the page view and then terminated. There was no long running server.

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

#162
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…

This is how we handle notification emails and some incoming emails as well. There are few gotchas only (using separate domains is one of those)

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

#163

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…

I would argue that an email client that read email from s3 instead instead of a mailbox is preferable.

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

#164
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" is a ridiculous stupid term. You'd think it meant something like Photoshop, some system that doesn't rely a server, something that lives locally. Nope. It's just a server that someone else manages 90% of.

No we call those a more succinct term: local processes. We call "serverless" for processes running not locally that do not require standing up a server that you care about for, are billed by usage only ($0 for none, infinity for infinite), and you are not concerned where or how it is running. Are there computers listening for requests somewhere that someone is managing that is doing this? Yes. But from my frame of reference it is a service, not a server. I know a lot of people on here get hung up on it, but it is the term and it is not going to go away.

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

#165
post #114

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…

I do something similar to OP [0] - and currently forward to another provider (single address, but that's only the 'envelope' To; so it doesn't matter, I preserve the original whatever.to.address). That's mostly an artefact of transitioning from that provider to my own on AWS, but I stopped working on it for some time and never continued. My plan was/still is to write a client that can read 'Just a Bunch of .Eml' form…

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. The following identities failed the check in region US-WEST-2: can-we-overwrite-this@my-domain.com, Test random ...
On their example doc, using SMTP credential, they also mention this: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/exampl...

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

#166
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 solution in "what will deploy"... in the graph there are over 40 entities! In the following they list 13 different aws components needed.

And all of that not even really doing the core feature of email sending/receiving that is provided by SES.

Maybe you can deploy it with a single cloudformation recipe, but then it is so so many systems that you will have to watch and check for issues, quota, policies, usage billing and configuration.

And you are not even in control, you have to go lick aws ass for easing the restrictions on the number of emails sent and to who. Plus there are probably a number of drawbacks and hidden limits that are not exposed to you by aws and that you will discover the hard way.

For exemple, looking at the description I'm wondering, how do you do coherent backups at a random time? Knowing the quality of service of aws api, what do you do when there are random crash, network errors and co in the middle of the pipelines/lambdas?

In my opinion this is a good exemple of an over-engineered solution.

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

#167
post #69

Earlier quoted context omitted.

gmail is 25MB, yandex is 30MB.

Gmail is more than 25MB. It appears to be 150MiB. [disclosure: I was involved in the development of raising this limit, years ago]. $ nc aspmx.l.google.com 25 220 mx.google.com ESMTP ba11si4162422plb.407 - gsmtp EHLO foo 250-mx.google.com at your service, [[IP address elided]] 250-SIZE 157286400 [...]

hm. when I did a Google search, the instant-answer snippet shows 25MB

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

#168
post #141

Earlier quoted context omitted.

Billing exists for servers as well. Servers need to be configured as do lambdas. Servers also have backup needs. Servers also present security problems of access. It's not that hard to configure a lambda to run in just as limited a way as a physical machine. Not having to worry about MCEs or disk failure patching makes the concerns less like a "different set" and more like a subset of things to worry about relative t…

Amen. How many times did you update your Node.js AWS Lambdas or GCP Cloud Functions because of the Linux kernel CVE of the week? You didn't because all you're responsible for is your few lines of Node.js logic that kept on scaling and humming along. The cloud vendor cares for the rest.

Just because you didn't doesn't mean they did and you didn't actually have any vulnerabilities. There is no such provable attestation of security in serverless model.

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

#169
post #167

Earlier quoted context omitted.

Gmail is more than 25MB. It appears to be 150MiB. [disclosure: I was involved in the development of raising this limit, years ago]. $ nc aspmx.l.google.com 25 220 mx.google.com ESMTP ba11si4162422plb.407 - gsmtp EHLO foo 250-mx.google.com at your service, [[IP address elided]] 250-SIZE 157286400 [...]

hm. when I did a Google search, the instant-answer snippet shows 25MB

“Some documentation may be out of date” is practically Google’s motto.

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

#170
post #69

Earlier quoted context omitted.

gmail is 25MB, yandex is 30MB.

?!? I said ISP emails, which a lot of people still use. Outlook/Hotmail are 10mb though. And outlook client is 20mb received.

I'm only trying to help. Like, every PM has used gmail regard it as "normal" - so if you're different, you're abnormal.

also, if your PMs listen to reason here's a site with a table

https://www.outlook-apps.com/maximum-email-size/

which show the 10MB size at the low-end but still used by a huge carrier

Post reply on HN