Live data from Hacker News

A serverless email server on AWS using S3 and SES

github.com

141–150 of 217 posts

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

#141

Earlier quoted context omitted.

> 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.

"means there is no physical or virtual hosts to manage" We're just swapping one type of management for another, really. Becoming proficient in all the permutations of AWS stack, for example, to * make sure you don't get overbilled, * have appropriate memory/limit resources on your lambdas, * have correct backup/redundancy on s3, * make sure all your IAM policies are correct and not allowing malicious actors, etc. and…

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 to managing servers.

I know most of this stuff is really well trod-over, but from your comment I think one'd get the impression that people are switching just because of a trend or something, not because there's an actual layer of management they're paying to have outsourced.

(I would acknowledge that view of it being a subset rather than a different set is invalid once you're debugging performance at a gritty level, where cold starts etc. etc. introduce their own equivalent layer of complication, but most people doing most things never need to)

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

#142
post #87

Earlier quoted context omitted.

This makes no sense (too abstract of a statement), but here let's try this: $ man systemd | head -4 | tail -1 systemd, init - systemd system and service manager An email daemon (Postfix, Exim, Dovecot, UW-IMAP, Sendmail, etc.) are services running on a server. An "email server" would be a server running a daemon to provide email service in this example.

This makes me think there should be a Linux tool to extract the Nth line of a file. With options to get the N-Mth lines, etc

Calling cut with a newline as the field delimiter works:

man systemd | cut -d $'\n' -f 4

Works with multiple lines too:

cut -d $'\n' -f 10-20,50-60

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

#144
post #33

Earlier quoted context omitted.

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

original lambda

"Your function runs from scratch on each request, with some intelligent caching for performance reasons."

Gestures at LAMP and PHP-FPM

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

#145
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".

And a million other moving parts: https://raw.githubusercontent.com/0x4447/0x4447-product-s3-e...

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

#146
Something link that could be useful as disaster recovery action. I case of problems with the Mail infrastructure redirect the DNS to something like that and incoming e-mails won't get lost in the meantime. The standby cost for something like that is much lower then a independent secondary e-mail system.

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

#147
post #69

Earlier quoted context omitted.

They shouldn’t. Most ISP email providers don’t support more than 10mb.

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
  [...]

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

#148
The actual email sending / receiving part is handled by Amazon SES here. Similarly you could use Sendgrid in that place. This project is a wrapper around those. It also doesn't aim to provide an email inbox - this is for programmatic handling of email.

Now the interesting part to me is using the email address local part to create an email address hierarchy upon receipt.

This project stores incoming emails to S3 and the '+' in the email address indicates subfolders from left to right.

That's a very creative way to organize emails for processing.

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

#149
post #121
post #91

Earlier quoted context omitted.

> I find IP based mail blacklist services such as BRBL obsolete and possibly harmful. Now that we have domain verification services like DKIM SPF etc. Blacklist the domain. SPF and DKIM require opt-in by the sending domain, of which the majority of non-commercial non-US outgoing MTAs do not do. IP-based blocklists, including Spamhaus PSBL Mailspike etc, are all valuable to catch IP addresses that should not be direct…

> Botnets continue to be the number one source of junk email and will likely continue as we add more and more insecure doorbells, garage openers, refrigerators, etc, to our home networks. Surely that's an argument against blocking IPs? Unless I suppose you argue they're predominantly in homes; and homes are predominantly not running (intentional, well-behaved) email servers, so sorry-not-sorry those who are.

Yes. The days of running a legitimate MTA at home are unfortunately over. Many US-based consumer ISPs block port 25 entirely except for connections to their own MTAs, but for the ones who don't, very very many of those IP addresses wind up on policy-based blacklists -- eg "this network is a bunch of consumer addresses and should never be connecting directly to an MTA"

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

#150
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.

It's indistinguishable from a regular web hosting. You just upload script to some ftp and don't manage anything either. You just configure links to other services like DNS, or DB if that's needed.

It's just now the same thing is done via some proprietary/custom cli tools and/or APIs not via a standard protocol and a trusty old clients that are already in your distro, and it's branded differently.

APIs are good for some uses. That's usually lacking with hosting providers. Other than auto-scaling I can also easily bankrupt myself with if I make a mistake, I don't see much qualitative difference. Only in the details.

Post reply on HN