No, that’s it. I am f#*&@-ing done. I went from gmail to tuta to proton. Now I hear something like FastMail. Some say privacy, some say security, but what they never say is corpos gonna corpo.
No, I am done using third party services. This may be a Sisyphus task, but I want to self host a mail server even if 60% of it goes to another person’s spam.
I’ve heard about Dovecot and some other services. While searching YouTube, I came across a defunct channel that still has this old video that gives instructions to selfhost email: https://www.youtube.com/watch?v=9zP7qooM4pY
Cherry on top would be to have as many parts with the GPLv3 license as possible.
Any guidance or instructions would be greatly appreciated. I have a domain name and I am currently hosting a small webpage for fun. Nothing serious.
Email self-hosting doesn’t have to be difficult. Ignore the detractors here.
I want to throw another option into the mix: nixos-mailserver. It sets up and manages a classic stack of email services. Through the magic of nix, you get a VERY reliable setup, and all the difficult parts (and those you don’t care about) are abstracted away in a really nice manner.
If you either already know nix, or are OK with investing a bit of time into learning the ecosystem, I urge you to go this route.
I’m running it on a Hetzner server. Had to ask them to open port 25, which was no issue. Set the DNS records as in the linked docs, and immediately had a 10/10 on mail-tester.com and no issues found on mxtoolbox.com
It’s also super easy to add additional domains. I’m hosting for multiple people now. Literally zero issues.
Again, don’t listen to the fearmongers. You got this.
It’s not the software that’s the issue. The issue is other sites not recognizing your server as legitimate, or your server being hacked and used to spam and putting you on a spam blacklist.
I had to give up independent hosting because of that.
Don’t do it. The technical part of email hosting is rather easy but the delivery problems will bite you in the ass. You’ll have to find an ISP which nets are not on any blacklist for Mail, you’ll have to activate every single layer of email security (SPF, DKIM, DMARC, DANE, and maybe ARC) and you’ll still have a lot of problems delivering mails to any of the big providers where most of the people have their accounts.
You could take a look at mailbox, but as I said: the hosting itself is trivial.
Lots of good suggestions in the comments. To save time, you can use a one stop setup option like mailcow or server management software like webmin.
If you go the VPS route, it will be hard to find one that doesn’t block port 25. A relay service gets you around that restriction. Many relays also hold your email if your mail server goes down.
Finally, test your setup with tools like mxtoolbox and follow the suggestions to set up SPF, DKIM, etc. When everything is correctly configured, it will take a few weeks for spam filters to stop auto blacklisting your new domain. After the initial config period, maintenance is mostly hands off. Don’t forget to tweak your own spam filters.
Don’t. It’s very hard to get yourself off spam lists as an individual
Plenty of folks (myself included) seem to manage just fine.
Please stop dissuading people from doing a thing they want to do, if you insist on pointing out potential pain points, frame them as a “be aware of X and Y”, that’s a much more helpful attitude that leaves the agency of choice with the person asking the question.
This is not personal, I’m just a bit fed up with the blind “no don’t” when people express an interest or desire in doing a thing.
I agree with the VPS route if you have the appetite for it. I host my own email server on a VPS. And then you can also use it for whatever cool intentions you might have with that VPS. A tailscale exit node that isn’t coming from your home IP is nice way to gain back some level of privacy. Just one example of many other uses. I haven’t found self hosting to be high maintenance like others have suggested.
A trick I discovered this month. Use the smtp_address_preference flag on postfix to send over IPv6.
If you run your home IP address through the blocklist check on MX Toolbox, you’ll find that almost every home (CPE) IPv4 block is blacklisted. It’s simply not the case for IPv6, and all the big players accept mail over v6.
Apart from that, just make sure to jump through the TLS, DKIM, SPF hoops so other servers don’t reject you. The MX toolbox free stuff has enough to test and verify that it’s right.
I don’t bother with traditional spam filtering. The SPF/DKIM checks catches enough of it.
Pick mox or Stalwart. Both are one program that does everything (sending, mailboxes, spam checks, admin page), so you skip the Postfix-and-Dovecot pile.
If you want the simplest, mox. Its quickstart asks for your address and prints the DNS records to copy. It’s MIT-licensed though, not GPL. If the licence matters most, Stalwart is AGPL-3.0, the closest to what you asked for (a few extras are paid, the mail server isn’t).
The catch is the same for either: a home connection usually has port 25 blocked and Gmail distrusts home addresses. So run it on a small rented server (a VPS), where it’s still your software and your mailboxes. Before paying, ask the provider two things: will it open outgoing port 25, and can you set the IP’s reverse DNS name to mail.yourdomain.
Done looks like: a test to mail-tester.com scores well, and a message to a Gmail address lands in the inbox. Keep your current mailbox until a week of mail has gone through cleanly.
I am hosting my own email server on a rented server for multiple years now. Just recently I stumbled upon this post https://jan.wildeboer.net/2022/08/Email-1-Postfix-2022/ which has good explanation and even tutorial style command examples.
I don’t know if it would work from a homeland, but as long as DKIM, DMARC and SPF works, I don’t see why not.
If you want to go into the nitty gritty, get How to run a nail server.
A hammer?
If you really want to do that, https://stalw.art/ seems to have every feature you could want and does not seem very hard to install. The community version is AGPLv3. Thunderbird uses it for their new email service.
An alternative approach incase you haven’t gone this far yet - get a custom domain and use that with your email provider to create a portable email like you@youewebsite.com. You get the benefits of someone else handling the infrastructure while having the ability of moving your email to any other provider if you find them troublesome. Moving involves effort of course but at least you are not bound to an @protonmail.com or other address; you remove tge vendor lock-in which is the biggest pain with many of these companies.
It doesnt avoid the faff of having to move but its much easier than maintaining your own email server.
Most of the struggles with your own email is that you get flagged as spam and it takes time to fix.
So as a first pass, maybe consider hosting receive-only email. What I mean is, use it to sign up for things, but if you need to send an email use another provider. That should let you get used to the whole process without breaking everything.
No you don’t.
I’m pro self-hosting but email is just not critical enough to take on the admin overhead it requires to self-host. Maybe his situation is different and email is more critical in his work/life. If that is the case I would go with the middle ground suggestion provided below which is just to have a custom domain so that switching providers is easy. I would add a FOSS desktop email client so that even when switching providers migration of existing emails is a non-issue.
Almost everyone below downplaying the difficulty is suggesting the use of a vps as a way to “make it easier” or make it work at all. But that defeats the purpose as his main complaint is corpos doing corpo shit. Last I checked VPS providers aren’t mom and pop shops so that’s just kicking the can further down you tech stack. You are still at the behest of your VPS provider and doing significantly more admin task just for email.
I personally believe the opposite email is so critical that it is not worth trying to self host.
I do however agree that having your own domain is perfect for it though. Having your own domain name is the way to go, just make sure whoever you go with offers a wild card option so you can make up unique names for everything, you get no spam. And if you change hosts for whatever reason you do not need to setup each email again.
Domains are also not mom and pop shops either and neither is the IANA or Internet Service Providers assigning IPv4 addresses… Not totally disagreeing with what you said, but it’s large organizations all the way down.
I’ve used MXRoute for email before and I’m surprised I haven’t seen this recommended on Lemmy elsewhere. I found out about MXRoute from Reddit many years ago, used it and liked it. No longer a customer for unrelated reasons. The owner is a legit email dude and the service is very reasonably priced with a strong focus on IP reputation. Typically have Black Friday sales, too. Use them (or anything else) instead of self-hosting an email stack!
MXRoute
Oh…my…god…
That is the cleanest mobile-formatted website I have ever seen… With the “we will ban your entire lineage if you fuck around” attitude to top it off!
itssobeautiful.jpg
I’ve self-hosted email for over 25 years. Much has changed, but the basics are still the same - and it’s not difficult.
The first thing I would ask though is what are you looking to spend, before any required hardware? Meaning just the reoccurring provider fees, whether that’s your broadband ISP provider with static IP service added on (this almost always requires a business account, also very easy to do), or a cloud VPS provider (probably cheaper)?
Thank you! I don’t get why these threads are always so full of FUD.
Once I setup email it’s been little to no maintenance. Very “set it and forget it”. I check my logs after I see the software updated by my package manager to catch breaking changes. Which are super rare. I’ve had to increment a version number in a config a time or two.
There’s no FUD, just D.
Hundreds of us here on Lemmy have hosted our own email before, some (like me) for over a decade. We share our opinion that it’s on balance not worth it as (from experience) it’s a massive pain in the arse to keep yourself off blacklists. You do you though.







