Live data from Hacker News

A serverless email server on AWS using S3 and SES

github.com

11–20 of 217 posts

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

#11

> 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. Looking at diagram, I'm not sure Postfix + Cyrus is more complicated than what you've got here. Congrats though, I'm sure this will help a lot of people wanting to manage mail themsel…

> Just not sure how you're going to get mail accepted by others from constantly changing (and possibly blacklisted) Amazon IPs without using trusted smart hosts.

Are you thinking about EC2 public IP addresses here? That service uses a different IP range than SES, which you can verify by comparing https://ip-ranges.amazonaws.com/ip-ranges.json to `dig amazonses.com TXT`. In my experience, we haven't had any issues with SES emails getting blocked, but you must set up DMARC properly and respond to bounces quickly.

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

#12
post #7

Reading it I get that AWS now by default restricts email by - 200 mails per day max. 1 per second. - Can only send mail to verified addresses. Not sure how they verify though. - Can only send mail from the domain you own and verified. All these are good steps. Guess that will gradually take AWS IPs out of all those mail blacklists. And while we are on the topic, I find IP based mail blacklist services such as BRBL ob…

>> I find IP based mail server blacklist services such as BRBL as obsolete and possibly harmful. Now that we have domain verification services like DKIM SPF etc. Blacklist the domain. Not the ip

Agree with you 100%. I want to run a mail server on my AWS server and not use Yahoo so that Verizon doesnt snoop on my mail and insert creepy ads that seem like emails. But this is impossible as my mail would get dropped into a blackhole.

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

#13
post #7

Reading it I get that AWS now by default restricts email by - 200 mails per day max. 1 per second. - Can only send mail to verified addresses. Not sure how they verify though. - Can only send mail from the domain you own and verified. All these are good steps. Guess that will gradually take AWS IPs out of all those mail blacklists. And while we are on the topic, I find IP based mail blacklist services such as BRBL ob…

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

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

#14
post #7

Reading it I get that AWS now by default restricts email by - 200 mails per day max. 1 per second. - Can only send mail to verified addresses. Not sure how they verify though. - Can only send mail from the domain you own and verified. All these are good steps. Guess that will gradually take AWS IPs out of all those mail blacklists. And while we are on the topic, I find IP based mail blacklist services such as BRBL ob…

IPs are still a precious commodity, hence the threat of being listed by a high quality blocklist like Spamhaus provides an effective degree of encouragement for senders to clean up their act.

Domain blocklists also exist, but the stick isn’t as sharp, because domains are a dime a dozen.

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

#15
I use this myself for forwarding emails and signing up for random sites. Pretty easy to set up and 0 overhead to maintain. One of these days I'll set up a ui around it to send emails. Having both set up and maintained an email server "the old fashioned way" and using this, the over head on this is way less than postfix et al. This only goes for receiving email though, sending email with this is a biiit clunky, and doesn't support attachments (yet). If you have an aws account and a spare domain give this project a shot! It has a surprising amount of utility.

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

#16
>Pricing

>$1 per active CodePipeline (must run at least once a month to be considered active)

I'm not too versed in how aws services work, but how many active codepipelines are you expected to have running every month? A few paragraphs up it says that there are 3x CodePipelines in total, but they might not be all active every month. If all of them are active, then that would come out to $3/month, which seems a bit pricey considering you can get an actual hosted email plan for $5[1]. If you're looking to save money you can go even lower[2][3]

[1] https://www.fastmail.com/pricing/

[2] https://purelymail.com/pricing

[3] https://tutanota.com/pricing/

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

#17
From one side, great work!

From another side, this looks much more complex, that getting an email service with catch-all address and use rules/filters to do the same. I'd programmatically manage rules/filters and folders, rather than this entire system. All email providers I have used on scale (Google, Microsoft, Rackspace) support this. I'd still have a usual email service with SMTP and IMAP, rather than incompatible custom JSON APIs and unknown failure modes.

What is really interesting is cost on scale. Because if it is cheaper to send/receive 100M emails though this, than it's worth trying. However this is exactly the part not covered at all. And if you are sending not a lot of emails, maybe pay $50 to major email provider and spend your time on something more important?

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

#18
post #7

Reading it I get that AWS now by default restricts email by - 200 mails per day max. 1 per second. - Can only send mail to verified addresses. Not sure how they verify though. - Can only send mail from the domain you own and verified. All these are good steps. Guess that will gradually take AWS IPs out of all those mail blacklists. And while we are on the topic, I find IP based mail blacklist services such as BRBL ob…

> 200 mails per day max. 1 per second

They've been limiting max sends per day for a long time. I set up an account around 4-5 years ago and they had a limit back then. I forgot the exact amount but it was 200 or less.

But, they do make it pretty easy to get the limit raised. I filled out a form and about a day later they bumped my limit to 50,000 per day and I think I only requested 10k per day. The form required basic information like providing a reason why I wanted a higher limit and a link to my main site where I was collecting emails from. It seemed to be human reviewed.

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

#19
post #7

Reading it I get that AWS now by default restricts email by - 200 mails per day max. 1 per second. - Can only send mail to verified addresses. Not sure how they verify though. - Can only send mail from the domain you own and verified. All these are good steps. Guess that will gradually take AWS IPs out of all those mail blacklists. And while we are on the topic, I find IP based mail blacklist services such as BRBL ob…

RE: verification

AWS sends an email to the destination address and ask them to click a link to receive emails from SES.

There's no way for the email sender to verify an address. The email recipient has to click on the link in the email SES sends them.

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

#20
post #4
post #3

Am I reading this correctly, you have to upload a JSON file to an S3 bucket to send an email? That’s not really email then, is it?

it wouldn't be hard to have a JS ui that presents an email form, but converts that to JSON and posts it to S3.

Sure, but pretty much every other email option out there has protocol support. Without that, I think it's a stretch to call this an email server. (Though there are a few that are only accessible via their client, such as Hey)
Post reply on HN