r/programming • u/wheatBread • Oct 26 '26
Why is it so expensive to send an email?
https://evancz.dev/why-is-it-so-expensive-to-send-an-email
828
Upvotes
r/programming • u/wheatBread • Oct 26 '26
52
u/aust1nz Oct 26 '26
It’s a good read but 1,000 emails on SES are $0.10.
8
u/ErikD314 Oct 26 '26
Grammatical error? "My emails went through to certain inbox providers just fine, so it must be possible for them to avoid heavily relying heavily on IP address block blacklists." Specifically: "...heavily relying heavily..." - Hey it proves I read it, right?
1.2k
u/chucker23n Oct 26 '26
TL;DR:
Mostly what you're buying is trust — on paper, e-mail is heavily decentralized, but in practice, this was so heavily abused especially in the 2000s (I remember getting a thousand spam e-mails a day before requiring SPF became commonplace) that these days, it's mostly a circlejerk among the big vendors. Outlook.com / Microsoft 365 accepts mail from SendGrid / Twilio. But does it accept it from you? That's more of a roll of the dice.
317
u/NenAlienGeenKonijn Oct 26 '26
I think a lot of tech nerds age 40 and over have tried self-hosting email at some point in their lives and eventually gave up on it because despite being trivially easy to set up, it's just not worth the effort and the constant "I hope this mail actually arrives" bug in your head each time you send a mail.
330
u/dreamlax Oct 26 '26
I ran my own mail server VPS for a while (10+ years).
After setting up DMARC, DKIM, and SPF (and also SRS and then ARC which was needed based on how I was forwarding mail around), I was happy that email was successfully received by a majority of major email services, including Google, Microsoft, etc.
However, it is just a massive pain in the ass to maintain. In the end I swapped it all out for CloudFlare. The free plan can automatically forward to another email (e.g. a Gmail acount), and the $5/month plan allows you to send email as well. It's honestly saved so much effort and I was paying around $5/month for my VPS anyway.
20
u/bureX Oct 26 '26
I have my own e-mail server, and it took me ages (years) to get my newly acquired private IP addresses to stop being listed on all sort of blacklists and SURBLs. Google and Microsoft don’t even allow you to push for any of that, they simply reject any e-mail you send, it doesn’t even reach the spam folder.
You just have to wait and be at their mercy.
Keep in mind, I am using this e-mail server for my own personal stuff, as well as for my sidegig company. But there’s no way I would allow anyone to get access to it, e.g. a family member or a friend, because it only takes a few spam emails or one compromised account to get blacklisted all over again. And I mean the entire server.
Oh, and I also need to mention all the spam e-mails I receive. I need to setup all sorts of anti spam measures, like Spamassassin, otherwise I will receive tons of garbage, especially from China. But they’re oftentimes using GMail to send all that!!
Stupidly enough, due to other people’s server misconfigurations (SPF, DKIM), I constantly get legitimate e-mails going into spam on my end.
It’s a shitshow.
It’s rarely about trust, but mostly about how big you are.
141
u/iluvatar Oct 26 '26
Simple answer: because the big providers have colluded to make it impossible for smaller players to compete. I run my own mail servers and I have DMARC, DKIM and SPF set up. I used to send out a newsletter to ~50 people for a small event that I ran. But half of them weren't receiving it because Google, Microsoft et al were blocking my messages. They claim it's in the name of preventing spam. But in reality, they're just locking legitimate email senders out and there is nothing you can do about it. Really, governments need to step in and force them to stop their anticompetitive practices. But they won't.
12
u/Ch3t Oct 26 '26
I worked at a small company where we had a problem with people stealing other people's lunches from the refrigerator. Also, open relay was enabled on our email server. One day one of the salesmen sent an email to everyone complaining about his "tasty chicken sandwich" being stolen. I telnetted to our email server and sent him an email from homer.simpson@ourdomain.com, subj: mmm, tasty chicken sandwich. I could hear him cursing one floor below in a different wing.
19
u/MartinMystikJonas Oct 26 '26
Because many people worked very hard to make sending spam expensive so our inboxes are not flooded with millions of junk messages.
17
u/mfitzp Oct 26 '26
Good stuff. Nice to read something written by a human for a change.
14
u/amped-row Oct 26 '26
All this and it’s not even secure
4
u/SessionIndependent17 Oct 26 '26
Because email has been poisoned. Even regular individual emails I might send from an org email with the proper txt/pk records set up stopped working via Gmail. No assistance is available.
4
u/saxbophone Oct 27 '26
TL;DR: Email is a cartel in practice.
7
u/lazyant Oct 26 '26
AWS SES is like two orders of magnitude cheaper. You have to do a bit of work yourself though
6
u/GeneralSEOD Oct 26 '26
I love topics like this. You will have industry veterans swearing against running your own mail server. Just go to a provider. Then you have like 4 redditors claiming they're running their own mail server and it's been fine.
(Nobody has had any mail from them for 17 years)
6
u/Humphrey-Appleby Oct 26 '26 edited Oct 26 '26
Don't worry, Google, Yahoo and Fastmail are hell-bent on making it even more expensive for you with with DKIM2, an over-engineered, technically flawed and entirely unnecessary replacement for ARC, at the expense of established DKIM functionality. This will drive more people away from on-premise hosting and smaller, cheaper ESPs (fewer options due to higher costs) and towards a handful of players.
3
u/Zardotab Oct 27 '26 edited Oct 27 '26
Because spammers and scammers have infested it. We need a new standard, something with e-stamps.
2
u/DDFoster96 Oct 26 '26
It costs me 50p + a further 50p/minute to call a VoIP phone at one address from a VoIP phone at a different address. It's the same price as calling an analogue landline. But I can call either phone from a mobile for free, with a lot more infrastructure involved. I'm already paying for both internet connections, why does the traffic over them cost that much extra?
2
u/Mediocre_Safety5743 Oct 26 '26
Yeah that trust part makes sense, you are mostly paying to not land in spam. I tried self hosting once and most of my mail ended up in the spam folder anyway.
2
u/ksajadi Oct 27 '26
Is it? AWS SES let's you send transactional emails for something like $0.1 per 1000 emails. True, you can do it yourself (host your own email infrastructure) for much cheaper per email cost, but you're not going to achieve anything like the deliverability rates of SES or others, because that part is the hard part.
If you want to send marketing emails (especially cold emails) then you're in a whole lot of other trouble for spam rules, etc which make the total more expensive.
However, I agree with you on one part: companies like Customer.io charge per contact on your list and not emails sent. this means if you have a list of signups that you can legitimately send emails to (not spam), you will pay a lot of money just to keep those on the list, when in reality you only send emails to a subset of them every now and then.
i'd say search for product that do "drip campaigns over ses" and you'll end up paying way less. but you still have to keep your email practices clean (no emails without the recipient's signup)
2
u/xylarr Oct 27 '26
I don't self host my actual mail, but I have setup an SMTP relay on my LAN so machines on my network can send email.
This was quite involved because you have to setup the various keys and sign messages. I also setup a reverse IP lookup so it returns the same domain. All of this is to make sure the destinations will accept the messages. Having the reverse lookup was the last step to have Google accept my mail.
2
u/TheGreatKonaKing Oct 27 '26
We have a terrific system that makes it extremely hard for small scale senders to send out ordinary business email, while, of course, still allowing the deluge of crap from large scale spammers to go right through.
4
u/WegWerfAccount122 Oct 26 '26
sending emails is super cheap on aws ses and most services are just upselling ses
1
u/vr6wannabe Oct 26 '26
You're paying for a team of people that enjoy walking through a live mine field every day.
I build email and there's nothing "hard about the tech" but man managing our IP blocks, reputation, abuse etc. Thats the entire business.
What I love about it, is its something that's not going to be vibe coded.
1
u/Fine-Comparison-2949 Oct 26 '26
Paying for the convenience.
For you email to go right in my spam inbox.
1
u/ElvishParsley123 Oct 27 '26
It used to be any discussion about spam ended up with this checklist posted to it: https://craphound.com/spamsolutions.txt
I don't really get any spam anymore on my personal accounts, so it seems like the current solution managed to avoid all those issues. Or maybe just we decided some of the downsides listed were worth trading off for getting rid of spam.
1
u/fastdruid Oct 27 '26
I ran my own mail server for years (qmail) but it was becoming more and more of a pain as time went on. The way qmail handled accepting mail[1] would occasionally cause my IP to be blacklisted, the range being DHCP would cause it to be blocked generally, the various additional requirements were a pain and dealing with the constant spam was a huge issue.
I gave up when I moved to a provider that handled it all for me.
[1] For security reasons qmail accepts all mail, then checks against its internal user list. This prevents someone using a word list to validate usernames. Unfortunately it also means that certain software also assumes that its an open relay as well as the user IS valid. Until I disabled bounces I would get huge numbers of bounce messages queued that would themselves bounce.
1
u/dotnet-kvadrati Oct 27 '26
Anybody have some good sheet of recommendation what you need all to setup in you DNS so you are on a safe side?
1
u/PoloGator Oct 28 '26
I've been self-hosting my own email for the better part of 25 years and there are challenges for sure. The biggest thing to get right is hosting it on a clean address with valid DNS (A, PTR, MX records). After that, so long as SPF, DKIM, DMARC, ARC, STS, etc. are configured it should work fine. But, it's not what I would consider simple either. 😅 Definitely not for those that just want it to work without putting in some effort.
1
u/Own_Appointment_6401 29d ago
Using aws simple email is around 0.10$ per 1000 emails, so not a large number unless you really need to send a large volume.
If you should require EU provider there are Scaleway in Paris - a little cheaper actually and very high on deliverability.
1
u/The4thMonkey 29d ago
I have been running my own mailsever for years now. It does require some effort with everything from breaking updates, DMARC/SPF, spamfiltering, somestimes white or blacklisting manually.
It's not an insane amount of work but you have to keep paying attention. If I had to put a number on it I'd say 30min of work per month on average.
However I mostly have semi trusted users and I dont send bulk mail = my bounce rate is basically zero.
1
u/Hell_Yeah_Brethren Oct 26 '26
I don’t know if this will help anyone, but this was an issue for me a while back so I made boxox. It’s like resend but for cloudflare.
https://boxox.dev
https://github.com/naieum/boxox
1
u/burnsnewman Oct 26 '26
It should be expensive.
-1
u/__konrad Oct 26 '26
-2
u/A_K_Thug_Life Oct 26 '26
bro, go with Cloudflare email setup with worker (for free)