News for hackers. Stuff that matters.
Re:Ask HN: Why can't I host my own email? by jhugo on Wednesday April 27, 2022 @10:49AM (#31180577)
I've been self-hosting email for about 20 years, from a dedicated server in Europe. The server hardware has been replaced a couple of times but kept its IP.

If you set everything up right, and choose the host for your mail server carefully, and never change IP, after a fairly short time you won't have much problem with being marked as spam. No more so than with any other email host.

As is so often the case, the people that say you should never do it probably have little relevant experience, they are just repeating something they heard.

Re:Ask HN: Why can't I host my own email? by baobabKoodaa on Wednesday April 27, 2022 @01:26PM (#31183007)
> If you set everything up right, and choose the host for your mail server carefully, and never change IP, after a fairly short time you won't have much problem with being marked as spam. No more so than with any other email host.

This is untrue. If you are the only person using your email server, your volume will be so low that the big providers (Gmail, Outlook, etc.) won't track your reputation. So, ironically, being a low-volume sender means your email will be constantly classified as spam.

I speak from experience: https://www.attejuvonen.fi/dont-send-email-from-your-own-ser...

Re:Ask HN: Why can't I host my own email? by jhugo on Wednesday April 27, 2022 @01:42PM (#31183262)
"This is untrue" and yet I and others in this thread have been doing this for a long time without encountering the issue that you so confidently claim exists.

My email server is used by two people. Reputation is tracked by all the big providers, as evidenced by a) my email not being classified as spam, and b) them showing reputation of my domains in their various reputation dashboards.

"Those who say it cannot be done should not interrupt those that are doing it."

Re:Ask HN: Why can't I host my own email? by baobabKoodaa on Wednesday April 27, 2022 @01:48PM (#31183357)
> "This is untrue" and yet I and others in this thread have been doing this for a long time without encountering the issue that you so confidently claim exists.

When you make a claim that supposedly applies to all people, a single counterpoint is sufficient to disprove the claim. It's as if you had said "all rabbits are black", then I showed you a white rabbit to counter that not all rabbits are black, and you come back with "look, I have a black rabbit here". How does that make sense to you?

> them showing reputation of my domains in their various reputation dashboards.

I never got access to their dashboards because my email volume was so low. If you somehow did, good for you.

> "Those who say it cannot be done should not interrupt those that are doing it."

I'm not "interrupting you from doing it". I'm interrupting you from giving bad advice to OTHER people.

Re:Ask HN: Why can't I host my own email? by jhugo on Wednesday April 27, 2022 @02:19PM (#31183758)
> When you make a claim that supposedly applies to all people, a single counterpoint is sufficient to disprove the claim. It's as if you had said "all rabbits are black", then I showed you a white rabbit to counter that not all rabbits are black, and you come back with "look, I have a black rabbit here". How does that make sense to you?

Well said!

Your claim is "it is not possible to self-host your own mail on a low-volume server and not get consistently marked as spam by GMail / other large operators". The existence of a single person successfully doing exactly that (and there are numerous such people in this very thread) is sufficient to disprove your claim.

Re:Ask HN: Why can't I host my own email? by e12e on Wednesday April 27, 2022 @03:11PM (#31184428)
> Your claim is "it is not possible to self-host your own mail on a low-volume server and not get consistently marked as spam by GMail / other large operators". The existence of a single person successfully doing exactly that (and there are numerous such people in this very thread) is sufficient to disprove your claim.

Perhaps that was their claim - but I've generally read advice as: "There's no predictable way to guarantee that any given person can today take over hosting their own mail with predictable and good delivery to Gmail and o365."

So just that a, b and c have, so far, good delivery from their setup is not a guarantee that person x can just "set things up correctly" and somewhat straightforwardly get good delivery.

Last I did it, I had to go via undocumented api/pages for both o365 and Gmail in order to improve delivery - and mail that gmail/o365 smtp servers swore they accepted without problems - still sometimes ended up as spam, or simply vanished after delivery.

This was all individual low-volume. Never found any reason for it.

That said, I'll probably go back to hosting my own mail, and just live with certain parties being bad net citizens, eating the occasional mail without error or bounce. It's not like I really expect them to do better. Although especially in the case of Gmail, it's a little like Disney eating up public domain stories and spitting out copyrighted and trademarked content. Google did a lot to force people away from proper quoting (by hiding the fact of how Gmail quoted things in the "friendly" ui) and they pretty much killed Google groups - after marginalizing alternatives. But those ships have sailed.

Re:Ask HN: Why can't I host my own email? by baobabKoodaa on Wednesday April 27, 2022 @02:27PM (#31183852)
You're correct, I shot myself in the foot there. But can we agree that some people manage to successfully run their own email servers and some people don't?
Re:Ask HN: Why can't I host my own email? by jhugo on Wednesday April 27, 2022 @02:40PM (#31184036)
Oh, absolutely. I wouldn't recommend it casually to everyone, but if someone says "hey, I want to learn to host my own mail, but everyone tells me I shouldn't", I'm totally going to recommend they do it. If they have the desire to learn, it's likely (not certain! but likely) that they'll succeed.

I do think that most of the effort/risk is at the beginning. Making sure you're on a reputable provider, checking the history of your IP, setting your mail server & the security features up correctly, monitoring deliverability etc.

After everything is working well, if you got that part right, the ongoing effort should basically just be keeping software up-to-date. You could always get unlucky and e.g. someone starts sending spam on a nearby IP and you have to waste some time dealing with that, but hopefully if you picked your provider well that won't happen. It's yet to happen to me, but my provider only offers dedicated servers, which are probably not so popular with spammers.

Re:Ask HN: Why can't I host my own email? by loup-vaillant on Wednesday April 27, 2022 @07:25PM (#31187075)
> Making sure you're on a reputable provider

Oh, that tiny little detail where it has become impossible for almost anyone to actually send email from home, either because residential IPs are all marked as spam, or because your provider is giving you an incomplete internet connection that blocks outgoing SMTP.

> You could always get unlucky and e.g. someone starts sending spam on a nearby IP

Can someone tell me why providers ever thought it was a good idea to block entire IP ranges?

Re:Ask HN: Why can't I host my own email? by jhugo on Thursday April 28, 2022 @03:58AM (#31189873)
> Oh, that tiny little detail where it has become impossible for almost anyone to actually send email from home, either because residential IPs are all marked as spam, or because your provider is giving you an incomplete internet connection that blocks outgoing SMTP.

Well, by "provider" I was referring to the hosting provider. I wouldn't typically recommend hosting from home [0]. Apart from the issues you identified, over the course of 20 years I've moved house multiple times so would have had email downtime and likely had to change IP address, likely leading to reputation starting again from zero (at best) or picking up an IP with bad history (much worse).

> Can someone tell me why providers ever thought it was a good idea to block entire IP ranges?

If you repeatedly receive spam from multiple IPs within a given ASN, and the abuse contact is non-functional or doesn't actually resolve the problem, it is fairly reasonable to consider that the ASN is friendly to spammers. Blocking by prefix rather than entire ASN is a bit less of a sledgehammer, but follows the same logic.

[0] If you own your house, have no plans to move any time soon, and can get a connection from a provider who is willing to give you a stable static IP that isn't categorised as 'residential/dynamic' by the major lists, hosting from home should be fine. But that's quite a few 'if's.

Re:Ask HN: Why can't I host my own email? by judge2020 on Wednesday April 27, 2022 @07:50PM (#31187230)
Their requirement for it applying to all people make it generally universally true. If you have a dedicated IP with reverse DNS pointing to an A record on the primary domain that server is responsible for, and you have SPF, TLS and DKIM running smoothly, it’s very unlikely any spam markers are due to the fact that you’re sending mail from <regular Ip> instead of <Microsoft 365>. This doesn’t mean you’ll never be in the spam folder, it means your spam reputation is based on the content and frequency of your emails.
Re:Ask HN: Why can't I host my own email? by MarcellusDrum on Wednesday April 27, 2022 @03:47PM (#31184855)
Not an expert on this, but maybe this is because you have been hosting your server for 20 years? Maybe newer servers have a higher threshold to cross? Seems a logical hypothesis to me, which would mean you're both right.
Re:Ask HN: Why can't I host my own email? by dugite-code on Wednesday April 27, 2022 @06:39PM (#31186720)
I selfhosted my email server on the same IP address for 10 years and never got my reputation tracked. I remember once reading that they needed something in the range of a few thousand emails going to their servers. I swear it used to be listed on the google dashboard but like everything else email related they hide this information to "protect from spammers". Sounds like an excuse for anti-compeditive behaviour to me
Re:Ask HN: Why can't I host my own email? by jjav on Wednesday April 27, 2022 @03:59PM (#31184987)
> being a low-volume sender means your email will be constantly classified as spam

"will" is a strong word. I've read that very low volume sending server can sometimes have issues, but never experienced it. My outgoing volume is about as low as it gets since it's just me and some family that don't use it much, but don't experience any problems.

Re:Ask HN: Why can't I host my own email? by baobabKoodaa on Thursday April 28, 2022 @05:03AM (#31190236)
Have you measured your deliverability?
Re:Ask HN: Why can't I host my own email? by warble on Wednesday April 27, 2022 @08:49PM (#31187625)
I have a low volume mail server and don't have any problem with this.
Re:Ask HN: Why can't I host my own email? by baobabKoodaa on Thursday April 28, 2022 @05:03AM (#31190240)
Is this a feeling or did you actually measure your deliverability?
Re:Ask HN: Why can't I host my own email? by Noughmad on Wednesday April 27, 2022 @10:53AM (#31180631)
> As is so often the case, the people that say you should never do it probably have little relevant experience, they are just repeating something they heard.

More likely, they're saying that 99% of people don't know how to self-host, and for 99% of the rest it's not worth the trouble. Also, if you have to ask, then you shouldn't self-host it.

Re:Ask HN: Why can't I host my own email? by tinsmith on Wednesday April 27, 2022 @11:32AM (#31181239)
"If you have to ask, you shouldn't be doing it," said the tired old King of Gatekeeping.

For a second, I thought I was on Stackoverflow. If you aren't starting by asking questions about the possibilities or limitations of a system you're about to work in, then you aren't starting properly.

Re:Ask HN: Why can't I host my own email? by JohnWhigham on Wednesday April 27, 2022 @12:15PM (#31181890)
That adage exists because those who really want to do it won't be asking to be spoonfed and will instead start doing the research themselves.
Re:Ask HN: Why can't I host my own email? by tinsmith on Wednesday April 27, 2022 @01:10PM (#31182753)
I get why it exists, but we also have to be honest with ourselves and admit that there is a massive problem in communicating without assumption of prior knowledge/experience. The tech world is particularly guilty of this, with veterans having forgotten that there was a time when they didn't know what they know, and lacking any patience to adequately help those seeking understanding. To add to the issue, the Internet proper is so noisy with partial or broken information that the task of finding the correct information is far more daunting than it was 20 years ago when I started learning.

We need to give newcomers a break and answer their questions well, and discuss to promote understanding, instead of swatting at them with our canes. The only way knowledge passes to the next generation of thinkers and tinkers is if we fuel that curiousity.

Re:Ask HN: Why can't I host my own email? by ehutch79 on Wednesday April 27, 2022 @01:20PM (#31182897)
Running an email server, that is secure, is not easy. In the mean time, before you're qualified and know what you're doing, your mail server is a danger to others. From being an open relay through just plain unpatched security vulnerabilities. It's not the consequences for you, it's the consequences your fuckups have for everyone else.

There's plenty of other tech they can screw with.

Re:Ask HN: Why can't I host my own email? by eddieroger on Wednesday April 27, 2022 @12:50PM (#31182454)
For perspective, some may perceive doing research as being spoon-fed. Sometimes, you don't know where to start and need a hand. At one point, I didn't know how to turn on a computer, and now I'm a software engineer.
Re:Ask HN: Why can't I host my own email? by ehutch79 on Wednesday April 27, 2022 @01:14PM (#31182807)
The area of 'i barely know how to keep a server running' is a problem for everyone else on the internet as your mail server starts relaying a deluge spam and phishing emails
Re:Ask HN: Why can't I host my own email? by Ancapistani on Thursday April 28, 2022 @03:47PM (#31197335)
Asking the question in an open forum is doing the research on it.

I've wanted to do this for a long time, and am using this very HN post as a source of information. I don't expect anyone to set it up for me, but I am hoping to identify the "gotchas" that are likely not discoverable by reading man pages.

Re:Ask HN: Why can't I host my own email? by Noughmad on Saturday April 30, 2022 @05:00PM (#31219303)
Except Google and StackOverflow exist now. You start by searching and reading tutorials, not by asking other people.
Re:Ask HN: Why can't I host my own email? by kijin on Wednesday April 27, 2022 @11:04AM (#31180794)
People who have been hosting their own email for decades like GP probably built up a solid reputation for their domain and IP before spam filtering became such a kafkaesque business and IPv4 blocks became so fragmented.

If you start self-hosting now, you should be prepared to lose quite a few emails randomly for the first X months while everyone else tries to figure out whether you're legit or not. Though I would encourage anyone who can to try to self-host at least some part of their email infrastructure, even if just for the learning experience, I would also recommend that they avoid using self-hosted email for anything business-critical until they're sure they've got the hang of it.

Re:Ask HN: Why can't I host my own email? by kuschku on Wednesday April 27, 2022 @11:32AM (#31181235)
Tip: Start with a solid SPF, DKIM, DMARC policy and register for microsoft, yahoo, etc.’s admin tools and add your domain to google’s webmaster and postmaster tools. (Yes, even if Google postmaster won’t show you anything yet)

Use mail-tester.com or similar tools to ensure everything is configured correctly.

And then just start sending. As long as your volume grows slowly over the first few months, you’ll get basically no rejects.

Re:Ask HN: Why can't I host my own email? by kijin on Wednesday April 27, 2022 @11:42AM (#31181395)
Yep, it takes patience and lots of trial and error to build and maintain a reliable email server, unlike an HTTP server or Minecraft server which you can fire up with a script any time you want. Probably explains why so few people do it successfully.
Re:Ask HN: Why can't I host my own email? by bityard on Wednesday April 27, 2022 @01:26PM (#31183006)
I know about the Google postmaster tools but I'm coming up blank finding anything about Microsoft and Yahoo. Do you (or anyone else) have links to these?
Re:Ask HN: Why can't I host my own email? by kuschku on Wednesday April 27, 2022 @05:31PM (#31186062)
Yahoo has merged theirs with AOL (kinda) and currently they only seem to offer https://senders.yahooinc.com/contact/#complaint-feedback-loo...
Re:Ask HN: Why can't I host my own email? by teddyh on Wednesday April 27, 2022 @02:03PM (#31183541)
Re:Ask HN: Why can't I host my own email? by Arch-TK on Wednesday April 27, 2022 @11:58AM (#31181657)
What is the yahoo version of SNDS (the microsoft thing) called?
Re:Ask HN: Why can't I host my own email? by rhn_mk1 on Wednesday April 27, 2022 @11:23AM (#31181072)
> you should be prepared to lose quite a few emails randomly for the first X months while everyone else tries to figure out whether you're legit or not

And then prepared to lose quite a few emails consistently for the next 10 years when some decide you're not legit.

Source: I self-host.

Re:Ask HN: Why can't I host my own email? by tragictrash on Wednesday April 27, 2022 @11:12AM (#31180888)
Don't forget about attacks. If you lose control of that domain you are pwnd.
Re:Ask HN: Why can't I host my own email? by jhugo on Wednesday April 27, 2022 @11:36AM (#31181315)
I'll definitely take that (which is largely under my control) over e.g. Google deciding that I've done something wrong one day and cutting off my email.
Re:Ask HN: Why can't I host my own email? by tragictrash on Wednesday April 27, 2022 @12:22PM (#31181993)
I agree with your sentiment, but It's not under your control. It's under the registrar's control. I'd argue registrars are way more prone to social engineering attacks than google is. I also don't use Google as my email provider though.
Re:Ask HN: Why can't I host my own email? by jhugo on Wednesday April 27, 2022 @12:31PM (#31182152)
The choice of registrar is under my control, though.

Also, little-known fact: if you register a UK company (probably more practical if you already have one, but the effort is not actually that big), you can register .uk domains directly with Nominet, the UK registry, by setting yourself up as a self-managed registrar. It doesn't cost anything (beyond the cost of the domain name) and is very easy. I'd love to know if there are any other registries that allow something similar.

Re:Ask HN: Why can't I host my own email? by FredPret on Wednesday April 27, 2022 @08:38PM (#31187543)
Man, this is really cool. Email is central to online identity and sounds like you have more control over yours than anyone I’ve heard of.
Re:Ask HN: Why can't I host my own email? by tragictrash on Wednesday April 27, 2022 @02:54PM (#31184215)
I'm in the USA and would totally bite the bullet and do something like that, if possible
Re:Ask HN: Why can't I host my own email? by jjav on Wednesday April 27, 2022 @04:11PM (#31185115)
> More likely, they're saying that 99% of people don't know how to self-host, and for 99% of the rest it's not worth the trouble.

Certainly way more than 99% of the general population wouldn't know how to self host, but within a techie population like HN, easily ~50% can be capable of doing it if they wanted to. Whether it's worth the effort is a personal decision, but there's a lot of value in owning your own email so I recommend it to anyone who's curious about it and willing to do it.

> Also, if you have to ask, then you shouldn't self-host it.

We should be encouraging curiousity (a HN value) not stomping on it.

If anyone asks, I say go for it. Worst case you'll learn new things, best case now you own your email.

Re:Ask HN: Why can't I host my own email? by sosborn on Wednesday April 27, 2022 @12:24PM (#31182052)
I would amend this to say, "If you have to ask, then you shouldn't self-host it for anything mission critical."

Otherwise, how would anyone learn anything?

Re:Ask HN: Why can't I host my own email? by andrewaylett on Wednesday April 27, 2022 @11:15AM (#31180936)
I'm in a similar boat, but have a slightly different conclusion: if you started 20 years ago, you'll have a much easier time today than if you started six months ago.

I think it's also fair to say that personal mail for a small domain is much easier than even a small amount of transactional email and don't even try sending newsletters beyond your friend group.

I have run mail off three different IPs over the ~20 years I've been hosting, switching IP address didn't affect me all that much.

Another thing to note is that receiving mail is really easy. Sending it is hard, filtering out the spam (and only the spam) from your inbound email is harder.

Re:Ask HN: Why can't I host my own email? by jhugo on Wednesday April 27, 2022 @11:33AM (#31181254)
Spam has become much easier to avoid on inbound mail at some point. I turned off all Bayesian/heuristic based spam filtering around 2015 and now just check SPF and DKIM, and have a fake first MX record. No "Junk" folder, everything that passes the checks goes to the inbox. I get maybe one spam mail every week or so, which I just delete.
Re:Ask HN: Why can't I host my own email? by born2discover on Wednesday April 27, 2022 @11:45AM (#31181449)
Could you please elaborate on the "..., and have a fake first MX record" ?
Re:Ask HN: Why can't I host my own email? by pferde on Wednesday April 27, 2022 @11:51AM (#31181554)
Legitimate SMTP servers will try your domain's MX records one by one, in order of priority, until they reach one that accepts the message. Spammers' scripts usually don't bother, they just try the first one and move on to the next address on their list.

Of course, this is not 100% reliable, as it's not too difficult for spammers to adapt and improve their scripts. Of course, vast majority of spammers are either not sophisticated enough, or do not care enough to do so, so if you don't mind your incoming mail to be slightly delayed, it's kind of a low-hanging fruit, as it cuts off a huge amount of low-effort spammers.

Re:Ask HN: Why can't I host my own email? by acatton on Wednesday April 27, 2022 @11:56AM (#31181613)
Not GP, but I think what they meant is having a MX record with a higher priority pointing to an unroutable IP

    blackhole  IN A 240.0.0.1

    @ MX 10 blackhole.example.com
    @ MX 20 mail.example.com
Re:Ask HN: Why can't I host my own email? by jhugo on Wednesday April 27, 2022 @12:33PM (#31182188)
Yup, exactly, for the reasons described in the sibling comment to yours.

Doing it this way doesn't even delay mail much most of the time; many legitimate MTAs connect immediately to the priority-20 MX after failing to connect to the priority-10 one.

Re:Ask HN: Why can't I host my own email? by jjav on Wednesday April 27, 2022 @04:28PM (#31185324)
Yes, receiving is very easy. Just doing that has a lot of value because now can't be arbitrarily cut off from your internet identity by gmail/et.al. for no reason.

So a easy way to get started is to receive everything directly and use a commercial (often with low-volume free tier service) relay for outbound until you get comfortable enough to remove the training wheels. (Or never remove them, that's a legit choice as well.)

> filtering out the spam (and only the spam) from your inbound email is harder.

I don't find that at all. Filtering spam is the easiest part. All I do is if SPF doesn't match, goes to spam folder. Beyond that, apply a bayesian filter.

I get no false positives and the spam that gets through to my inbox can be counted on one hand per quarter. Basically none.

That's yet another benefit of self hosting, since my bayesian filter is trained on my personal email specifically, it tends to become very good. Unlike generic gmail filters for example, where there'll always be some mail that ends up in spam no matter how many hundreds of times you mark it not-spam.

Re:Ask HN: Why can't I host my own email? by andrewaylett on Thursday April 28, 2022 @04:53AM (#31190185)
It's easy to block all spam, if you don't mind also blocking legitimate mail. What's harder is being confident you're not blocking any legitimate mail. I'm glad you've managed it :).

I have Bayesian filtering behind DMARC checks and a few other DNS and RBL checks. Still not perfect -- for all folk talk of the difficulties getting mail accepted by the big providers, a surprising number of companies still don't have matching forward and reverse DNS records :P.

One principle I follow is that I don't drop anything. Every message will either be rejected or delivered, with a narrow band of SpamAssassin scores that delivers to a spam folder.

Re:Ask HN: Why can't I host my own email? by Froedlich on Friday April 29, 2022 @06:23PM (#31211284)
> So a easy way to get started is to receive everything directly and use a commercial (often with low-volume free tier service) relay for outbound --- I used to do that. Did it for almost a decade, in fact. Then the spam filterers decided any message with mismatched send and receive routes was spam.
Re:Ask HN: Why can't I host my own email? by GoblinSlayer on Wednesday April 27, 2022 @12:05PM (#31181780)
Use aliases?
Re:Ask HN: Why can't I host my own email? by _moof on Wednesday April 27, 2022 @12:02PM (#31181746)
Yup, came here to say pretty much that. I've been self-hosting email for decades, first from a box on my home network (back when that was possible) and later from a VPS. It's not nearly as hard as folks make it out to be.

At the very least, getting your server marked as spam/blacklisted is not inevitable. Just make sure you aren't an open relay and that you've got properly configured SPF and DKIM records in your DNS. Once that's set up you can pretty much forget about it. I haven't had to touch any of my configs in years.

Initial setup takes maybe a day or two if you know your way around Linux or one of the BSDs.

Re:Ask HN: Why can't I host my own email? by porbelm on Wednesday April 27, 2022 @11:58AM (#31181669)
I agree, I've been hosting my own email for a few years now, using Mailcow on a Linode. With SPF and DKIM properly set up, mail is /usually/ accepted by the receiving end.

The only nag is that Microsoft is EXTREMELY strict for their hosted email. It's the only provider that consistently denies recieving mail from my server when the IP range it's on becomes greylisted in UCE-PROTECT -- which happens every so often...

Easily solved with getting the MX and backup MX IP's whitelisted there, but I haven't bothered cashing out for that yet...

Re:Ask HN: Why can't I host my own email? by jhugo on Wednesday April 27, 2022 @02:30PM (#31183891)
> when the IP range it's on becomes greylisted in UCE-PROTECT -- which happens every so often

This is a common complaint with Linode specifically, but probably fairly common with low-cost virtual server providers in general. It's worth looking into the history of your IP before you start using it to host mail, and if it's feasible, shelling out for a dedicated server (ideally from a provider that doesn't also offer virtual servers, or has enough network separation between them) makes it much less likely that your neighbour is a spammer. Mine's never been on UCE-PROTECT.

Re:Ask HN: Why can't I host my own email? by pera on Wednesday April 27, 2022 @11:10AM (#31180868)
It also depends on the reputation of your neighbours / AS... try to setup an e-mail server with a cheap VPS in DigitalOcean|OVH|Hetzner and even if you kept using the same IP address for 10 years I don't think you will be able to relay to gmail
Re:Ask HN: Why can't I host my own email? by flo123456 on Wednesday April 27, 2022 @11:16AM (#31180955)
I‘ve been doing exactly that for roughly 10 years and never had a problem with Gmail. You just have to set everything up to latest best practices (DKIM etc.). I‘ve even changed IP addresses a couple of times.
Re:Ask HN: Why can't I host my own email? by sam_lowry_ on Wednesday April 27, 2022 @11:26AM (#31181137)
I self-host for 20+ years, the last 12 years on Hetzner. Did some transactional mailings as well professionally. Not spam, but forum notifications, mailing lists.

2007..2014 were probably the worst. Gmail was chainging often, Microsoft was blocking everyone.

I think self-hosting is easier now than 10 years ago.

Re:Ask HN: Why can't I host my own email? by ryandrake on Wednesday April 27, 2022 @12:03PM (#31181760)
I self-host on Linode, and they occasionally fall into UCEPROTECT level 3 (the ISP-wide blocklist), likely due to a spammer trying to set up business as a Linode client. You can't really do much about ISP-wide blocklists, and honestly mail servers should not aggressively reject E-mail simply because some other rando at the ISP sends spam. I've always had success working with the aggressive mail server admin to get unblocked. Often it's just an E-mail to [email protected]
Re:Ask HN: Why can't I host my own email? by bsder on Wednesday April 27, 2022 @06:18PM (#31186530)
> honestly mail servers should not aggressively reject E-mail simply because some other rando at the ISP sends spam

This is because the business department will try to force admins to ignore requests to remove spammers as the spammers generally pay decent money.

By blocking everyone, it forces the ISP to get off their ass and kill the spammer irrespective of how much they are willing to pay.

Re:Ask HN: Why can't I host my own email? by selcuka on Wednesday April 27, 2022 @11:39PM (#31188488)
Technically true, but UCEPROTECT, in particular, is known to have some shady practices:

https://blog.sucuri.net/2021/02/uceprotect-when-rbls-go-bad....

Re:Ask HN: Why can't I host my own email? by bsder on Thursday April 28, 2022 @03:31AM (#31189704)
No argument. But I see this as vindication.

ISPs are now so sensitive to not allowing spammers that the RBLs can't make money from it anymore.

Re:Ask HN: Why can't I host my own email? by ryandrake on Thursday April 28, 2022 @12:16AM (#31188682)
They come across as pretty scummy: "Yea, we put your whole VPS provider in our blocklist. It's their fault for having one spammer customer: Blame them! By the way there's nothing you can do about it--except of course pay us to be whitelisted..."
Re:Ask HN: Why can't I host my own email? by technothrasher on Wednesday April 27, 2022 @02:10PM (#31183632)
I run two different private email servers, both set up pretty much identically with all the modern "best practices" as you say. One of them is on an address that has been stable for the past 10 years, and on a quality ISP that actually cares about reputation, and mail delivery is mostly not a problem. The other one is on a cheapo ISP, and mail delivery is so poor due to neighboring IP addresses causing me to get block that I gave up and resorted to using a free SendGrid account to relay my outgoing mail through.
Re:Ask HN: Why can't I host my own email? by pera on Wednesday April 27, 2022 @11:21AM (#31181043)
Which provider do you use? (by the way, I didn't mean that every cheap provider will have issues, prgmr/Tornado for instance works great for me)
Re:Ask HN: Why can't I host my own email? by cpach on Wednesday April 27, 2022 @11:13AM (#31180905)
I have a friend who is self-hosting on Linode. All mails from her reach my inbox (Gmail).
Re:Ask HN: Why can't I host my own email? by nemothekid on Wednesday April 27, 2022 @11:57AM (#31181650)
You started self hosting before Gmail was a thing. It’s completely likely that Google has had you whitelisted since the inception of gmail when they were far more open. The “reputable IP” is the hardest part of delivering mail reliably; and your post says the equivalent of “just have your dad gift you a reputable IP from the 90s”
Re:Ask HN: Why can't I host my own email? by _moof on Wednesday April 27, 2022 @12:05PM (#31181792)
I've also been hosting since before Gmail was a thing but have since set up new servers with new domains in disreputable subnets, and I haven't had any deliverability issues. If you configure things right (SPF, DKIM) you won't have problems.

This idea that self-hosted email is impossible is wildly overblown.

Re:Ask HN: Why can't I host my own email? by jhugo on Wednesday April 27, 2022 @12:37PM (#31182250)
I'd be very surprised if I was on some kind of static whitelist from the early days of Gmail. Such a list, if it exists, would likely be reserved for much higher-volume sending IPs.

I've helped others set up self hosting much more recently, and haven't had any reputation problems beyond the early period where the IP has no history. (It is important to find an IP that doesn't have recent bad reputation, but that is fairly easy to do. Unless your host is in the business of hosting spammers most IPs will be clean.)

The reality is honestly just that self-hosting mail is not as hard as all the people who don't do it say it is.

Re:Ask HN: Why can't I host my own email? by ipaddr on Wednesday April 27, 2022 @01:46PM (#31183328)
Google would ignore your data because you are too small?

Your ip and those of others who have sent mail to gmail have been recorded.

Your reputation score is high.

Try a new ip and see how hard it is.

Re:Ask HN: Why can't I host my own email? by jhugo on Wednesday April 27, 2022 @02:26PM (#31183839)
It's not exactly _hard_ on a new IP, as long as the IP is clean (which is reasonably simple to ensure, as long as your host isn't in the business of hosting spammers). You just have no reputation to start with, so you can't expect perfect deliverability from day one. But after some time (and we're talking weeks-to-months, not years), you'll be fine.
Re:Ask HN: Why can't I host my own email? by ipaddr on Wednesday April 27, 2022 @06:27PM (#31186616)
Sure if you want a lot of them to go through but not necessarily all. If someone marks your email as spam you may have to start all over again. If you want to send more than a few emails per day you have to warm the ip by sending specific volumes over time. It's doable, easier with a service to help you.
Re:Ask HN: Why can't I host my own email? by jhugo on Thursday April 28, 2022 @04:02AM (#31189898)
I guess it depends what kind of mail you're sending? I send & receive a lot of mail, but I can't imagine anyone has ever marked a mail from me as spam (except perhaps by clicking the wrong button), since it's just normal conversational personal & business mail. I never did any kind of deliberate 'warming up', I just set up the server and then started sending mail. In the first few months people would occasionally see mail from me go to their spam folder, but that hasn't happened in many years.
Re:Ask HN: Why can't I host my own email? by warble on Wednesday April 27, 2022 @08:53PM (#31187655)
I've setup 2 mail servers in the past 3 years and can reliably deliver to Gmail and Hotmail.. AT&T can be a chore I've found, they have been mostly unresponsive, but very little of my targets host there.

The other option is to relay through Send in Blue, or Sendgrid or something like that.

Re:Ask HN: Why can't I host my own email? by nerdponx on Wednesday April 27, 2022 @10:54AM (#31180654)
It's wild that something as pedestrian as hosting your own email comes with a pile of caveats comparable to those attached to browsing I2P or using cryptocurrency to buy stuff.
Re:Ask HN: Why can't I host my own email? by traceroute66 on Wednesday April 27, 2022 @11:10AM (#31180866)
> It's wild that something as pedestrian as hosting your own email comes with a pile of caveats

No, it's not "wild".

Its just that we're in 2022, not 1997.

Long gone are the days of "fire up Sendmail and you're good to go".

To those thinking of self-hosting, I would say they should start by understanding modern anti-spam.

Understanding modern anti-spam will not only help them with their inbound email, but will also help them understand how to ensure deliverability of their outbound email too.

Re:Ask HN: Why can't I host my own email? by redox99 on Wednesday April 27, 2022 @04:46PM (#31185575)
> If you set everything up right,

You don't even need to set everything right. Up until very recently (months), I was sending emails from a few of my servers, and I had NOTHING set right. As in, I was sending from IP addresses that were never mentioned on my DNS, no PTR no SPF no DKIM no nothing. Just good old "here's an email from this address, trust me I actually own that address and it's legit".

And it worked just fine.

Surely just a reputation thing, as I had been doing this for over a decade, and all emails were very important (password recovery, order details, etc), no newsletter or anything.

I recently replaced all that with zoho because I wanted something a bit more secure and didn't want to configure it myself.

Re:Ask HN: Why can't I host my own email? by Biganon on Wednesday April 27, 2022 @06:58PM (#31186869)
Self hosting my emails, grade of 100/100 on mail-tester, I'm on none of the dozens of blacklists I've queried... and Microsoft marks every single one of my emails as spam.

Just because you're lucky doesn't mean other people are "unexperienced". I don't know what experience has to do with it tbh. Maybe if you have experience working for Microsoft and you can contact the right people there...

Re:Ask HN: Why can't I host my own email? by jhugo on Thursday April 28, 2022 @04:16AM (#31189983)
Have you contacted Sender Support at Microsoft? They're very responsive and if your mail activity is legit they'll certainly help you solve the issue. Also make sure you set up the SNDS dashboard so you can view your IP reputation: https://sendersupport.olc.protection.outlook.com/snds/index....

In my experience the difference in outcomes that people have with self-hosting mail are largely down to, from most important to least, (1) the nature of the mail they are sending, (2) their choice of hosting provider, and (3) the correctness of their mail server setup. It sounds like you've got (3) sorted, so maybe (1) or (2) are relevant here.

Re:Ask HN: Why can't I host my own email? by snitch182 on Wednesday April 27, 2022 @12:24PM (#31182041)
I have been self hosting my private domains for a couple of years now and spam is not a problem with rspamd and it needs very little resources. Some large hosts just outright blocked me but i always get it unblocked with some assistance of my hoster. So, yes it is fine. I even set up webmail with rainloop. Better than anything once you got it set up right.
Re:Ask HN: Why can't I host my own email? by loup-vaillant on Wednesday April 27, 2022 @07:17PM (#31187018)
I did the same for like 10 years, and got similar results…

…except when Hotmail decided my entire IP block was barred from sending emails to them. Happened several times, I always had to wait a few days for my emails to stop bouncing.

In my experience it mostly works, but it’s never reliable.

Re:Ask HN: Why can't I host my own email? by notacoward on Wednesday April 27, 2022 @04:13PM (#31185136)
> probably have little relevant experience

Or maybe they have 10x the experience you do, but it was different experience for reasons beyond their control. Don't over-generalize from a sample of one. That's hubris.

Re:Ask HN: Why can't I host my own email? by jhugo on Thursday April 28, 2022 @04:03AM (#31189904)
That's what the word relevant means in relevant experience.
Re:Ask HN: Why can't I host my own email? by notacoward on Thursday April 28, 2022 @07:15AM (#31191144)
OK, then. They might have 10x the relevant experience that you do, but the outcomes were still different for reasons beyond their control. Better? Your scattershot insult was still full of hubris.
Re:Ask HN: Why can't I host my own email? by jhugo on Thursday April 28, 2022 @10:12AM (#31192672)
No, that's not better. If the outcomes were different, that's for reasons within their control. That's the whole point of this entire thread! There is no voodoo in self-hosting mail!

You either get everything right (due diligence of your provider and the IPs they're giving you, configuration of your mail server, not sending spam, monitoring your reputation) and your mail is delivered, or you don't and it isn't. That's it. Getting everything right, and knowing what you have to get right, comes with experience.

Re:Ask HN: Why can't I host my own email? by systemvoltage on Wednesday April 27, 2022 @06:49PM (#31186808)
May be you've been grandfathered into a white list when things weren't so sophistcated 20 years ago?

Have you tried setting up a brand new email server with a fresh IP from say, Digital Ocean or AWS?

Re:Ask HN: Why can't I host my own email? by jhugo on Thursday April 28, 2022 @04:09AM (#31189943)
I've helped friends set up mail servers fairly often, and they've had the same experience. But I wouldn't recommend DO (especially) nor AWS for this.

I'd recommend a smaller, tech-savvy hosting provider that has been around for a long time, who has no tolerance of abuse on their network, who is easy to communicate with directly (no paying for 'Business Support' just to talk to a clueful person), and ideally who mostly rents dedicated servers / colo rather than cheap virtual servers.