Live data from Hacker News

Self-host your mail server

blog.haschek.at

101–110 of 143 posts

Re: Self-host your mail server

#101

Earlier quoted context omitted.

I take a middle path. Self-host receiving mail, and use smtp2go.com for outgoing

How do this work? Do you need to use two different programs to send and read email?

For the end-user's perspective (ie, the dude who just wants to do email stuff with a mail reader like Thunderbird): It's two separate paths, as has been a normal thing for standards-based email for an eternity.

A user's inbound mail accumulates on a mail server. One server [protocol] handles getting the user's inbound mail to that user's mail client -- usually with protocols like POP or IMAP that let the user retrieve that accumulation.

Another server handles whatever mail the user decides to send, using SMTP. Each server is configured within the user's mail client, and that's just the normal way of doing things. It's ~always been split up like this (aside from outliers like Microsoft Exchange). :)

The user doesn't have to know anything about the existence or addition of a system like smtp2go. They just configure their client to send mail through mail.orgname.com (or whatever) like usual, and the back end handles the rest. Their pop/imap server address also stays the same.

---

Anyway, mail servers and relays. Mail servers don't talk to eachother using things like POP or IMAP. The traditional Internet way for a mail server to send mail to another is to look up the recipient domain's MX (Mail eXchanger) entry in DNS, which specifies the inbound mail server, and just send it over using SMTP.

It was thus delivered. It was all very trusting.

That trust began to break when spam became a problem that never went away. Requirements and reputation and filtering became a serious ordeal for mail servers -- both on the sending and the receiving side of things.

Services like smtp2go can handle part of the sending-side trust-wizardry in a centralized way. They do things like maintain the reputation of their IP addresses.

In using it like this, orgname's server (which might very well be under someone's desk) ceases to directly connect to each and every recipient domain's MX.

It goes through smtp2go instead: All outbound mail simply gets routed through smtp2go, as the result of a central back-end configuration thing on orgname's mail server.

In email terms this is called relaying, though smtp2go might prefer the term smarthost[1].

Meanwhile, local internal mail (from joe@orgname to jill@orgname, say) can just get delivered locally. It doesn't have to be relayed at all. This determination is made by orgname's mail server.

And, again: The user doesn't need to know or care that their mail is/isn't being relayed, and the concept of relays themselves is as old as the hills. The user can just be happy that their mail gets where it needs to go instead of being silently dumped into a ditch, and they don't need to do anything different on their end for this to happen.

[1]: https://www.smtp2go.com/blog/what-is-a-smarthost/

Re: Self-host your mail server

#102

I do. It's nowhere as hard as everyone on here makes it out to be. And I don't even use an easy solution like Mailcow. Spam is a solved problem with rspamd, and it's not even an llm

I still handle email for multiple small businesses (for over 20 years) and recently switched from the mailscanner+spamassasin to rspamd and the scanning is so much better/easier now my backend is still dovecot+postfix, still works beautifully. I am able to run rspamd+dovecot proxy on a small vps and the storage is handled by a backend office server with dovecot. If VPS has an issue can spinup another easily/anywhere…

Yup rspamd being able to do the DKIM signing was what made me move from spamassassian+opendkim to just this single solution. The web GUI and its speed were just really nice extras it brought with it. It's one of my favourite pieces of open source software.

Re: Self-host your mail server

#103

> A good starting point would be docker-mailserver which is a full mailserver suite deployable via Docker with sane defaults. I am running Docker Mailserver because it's one of the very few options that were actually easy to administer: https://docker-mailserver.github.io/docker-mailserver/latest... But the last release was like a year ago: https://github.com/docker-mailserver/docker-mailserver/relea... and same with…

Why would docker be a good solution for an email server? Why would you run it in a pseudo-vm?

Re: Self-host your mail server

#105
post #97

If you are self-hosting because you care about privacy, I'm not sure why. Email requires two parties. Unless both parties are self hosting, some company has a copy of that email. Google, Microsoft, and Amazon probably see 99% of all email on the internet (ok maybe not that much but probably pretty close). I'm not sure what privacy you gain by self hosting these days, since no one else is.

My wife and I are both in our own self-hosted server. We send sensitive emails back and forth all the time. Well, she does, not me so much. Since we're on the same server it never passes through a third party.

Plus there's people in Europe talking to each other that don't want the USA to read their emails. I mean there tons of situations wheee emails don't go through Google or Microsoft.

Re: Self-host your mail server

#107
post #97

If you are self-hosting because you care about privacy, I'm not sure why. Email requires two parties. Unless both parties are self hosting, some company has a copy of that email. Google, Microsoft, and Amazon probably see 99% of all email on the internet (ok maybe not that much but probably pretty close). I'm not sure what privacy you gain by self hosting these days, since no one else is.

My wife and I are both in our own self-hosted server. We send sensitive emails back and forth all the time. Well, she does, not me so much. Since we're on the same server it never passes through a third party. Plus there's people in Europe talking to each other that don't want the USA to read their emails. I mean there tons of situations wheee emails don't go through Google or Microsoft.

From this[0] report from proton mail, 74% of European email is routed through USA servers. So even if you care, the person you are sending to or receiving from probably does not. So the US companies are still seeing it.

For the use case of you and your wife, you don't really need to self host a mail server, you just need a file server, unless you're forwarding each other emails you got externally, in which case, someone probably already read it.

My overall point is that email requires at least two parties to have access to the content, oftentimes more than two, and chances are one of those parties is not privacy conscious, which breaks any privacy you think you might have.

[0] https://proton.me/business/europe-tech-watch

Re: Self-host your mail server

#108
post #99
post #95

Earlier quoted context omitted.

Fastmail is not cheap...

Fastmail is like $150 for 3 years. That's cheaper than I can rent any mail-capable VPS for, and it's cheaper than the electricity I'd pay (80W @ $0.15/kWh = $316 over 3 years) to self-host. And that doesn't include my personal-time hourly cost.

I'm not saying that a person should undertake hosting their own email here in 2026, but: 80 Watts sounds like a lot for a personal mail server.

The last small-corpo email server I ran myself was a Pentium 4 box that worked for eons. It did all of the things (the spam filtering, the virus scanning, the tossing, the software RAID storage, the open internet-facing ports including the webmail) for all of the people.

But it turned out that even with dozens of users, it hardly ever saw any load. Email was a complete snoozefest for it.

I'm quite confident that an N100 box would run circles around that P4 machine using any metric, and use an average of less than 10 Watts if all it needs to do is serve mail at home.

Re: Self-host your mail server

#109
post #16

I ran my own self-hosted email server from 2008-ish to 2018, and I would highly recommend against doing it! Especially when Fastmail and Proton are so cheap. I was running Postfix+Dovecot+Seive+SpamAssassin+Fail2ban+certbot+spf+dkim+reverse-ip+ It worked! Receiving email was overall pretty easy. I know I also did things the "hard way" by ad-hoccing all that together, and today there are a lot more out-of-the-box solu…

I take a middle path. Self-host receiving mail, and use smtp2go.com for outgoing

I've done the same for about 5 years (switched from SendGrid to smtp2go last year). I blogged about it when I first set it up: https://code.jeremyevans.net/2021-07-29-running-my-own-email...

Re: Self-host your mail server

#110

Earlier quoted context omitted.

My wife and I are both in our own self-hosted server. We send sensitive emails back and forth all the time. Well, she does, not me so much. Since we're on the same server it never passes through a third party. Plus there's people in Europe talking to each other that don't want the USA to read their emails. I mean there tons of situations wheee emails don't go through Google or Microsoft.

From this[0] report from proton mail, 74% of European email is routed through USA servers. So even if you care, the person you are sending to or receiving from probably does not. So the US companies are still seeing it. For the use case of you and your wife, you don't really need to self host a mail server, you just need a file server, unless you're forwarding each other emails you got externally, in which case, some…

Proton marketing. They're saying 75% of European companies are hosted in u.s. servers. Please buy our encryption product.

So if they self-hosted more they would t go through the USA.

And I bet now that 75% is decreasing rapidly.

But really email is not secure. It should be encrypted on the wire server to server but that's not guaranteed.

So just try hosting it yourself. It's not a big deal.

Post reply on HN