How do you solve email?
This Microsoft outage being the last drop in the bucket, I’m looking to get my email/calendar/contacts somewhere under my control.
As I already self-host a number of things (e.g. my Linux ISO collection), and have services exposed to the internet, it would make sense to run it at home.
After all, it’s not heavy lifting. It’s not hosting 500+ mailboxes for 100+ people. It’s just little old me, with a handful of domains, catch-all receiving and a few dedicated sending addresses.
However email is a bit more mission critical than my smarthome control or self hosted LLMs. Downtime could be critically bad, and I still don’t trust my home setup to be truly 99.999999% available.
I don’t mind paying for a service but if I do I’d prefer something European, given I’m based in the UK (and otherwise am an EU citizen).
I’m really curious how y’all solve it. I guess I’m interested in some kind of hybrid solution where there’s my own server and a hosted service, latter which acts as a backup solution, but still fully synced, so if my internet or power goes out (or my server goes down), I can still get mail sent and delivered.
So I’m not only just interested in the stack you run for email but the entire infrastructure, especially if you’ve solved this sort of off-site fallback service.
Comments
I own a business. We hit 9 years in September. When we started we did O365. At that time, a business as small as us had to go with a Microsoft “partner” because MS wasn’t going to deal with a business as small as us. We were immediately “man in the middle” hacked. We’d been in business 3 months and someone was grabbing our incoming emails and replying as if they were us. We had no idea. They changed payment terms and re-routed our checks as direct payments to some digital accounts in Miami (USA). I have no doubt that it was our Microsoft “partner” that set us up with O365 and Lync (this was a long time ago). When we pressed Microsoft about it they became totally unresponsive or nasty. We lost about $25,000 dollars right at the very beginning of our business. It was a very dark time for me. But, honestly, that was the best $25K I ever spent. Talk about “attack Surface”.!!! Now I do Fastmail, Nextcloud a nd other self hosted services. I am absolutely convinced that losing $25k was an absurd bargain. People on O365/ SharePoint/Teams get hacked every fucking day. But they don’t tell you about it.
There are more details, but those are the basics.
Are there issues with domains not being accepted?
Ive been running a very similar setup for a few months now, and haven’t encountered that many issues. This includes using the infra to send registration confirmations for https://nord.pub , and the vast majority of registered users are able to validate the mailbox (don’t have any visibility of how many people had to go to their spam box though). I’ve only had one encounter with a smaller email provider that insisted to only accept email from whitelisted domains/sending servers.
Also, I think it’s key to have a provider that takes at least some steps to keep email free. For Hetzner you’ll need to request unlock of port 25 and have to paid at least one bill. Not a lot but if you find a VPS provider that allows access to port 25 directly no questions asked, it’s probably a lot more likely to have a bad IP reputation.
You mean by other email servers? I haven’t had any issues yet.
Yeah I have heard of issues with websites accepting the addresses as legitimate and the like of outlook auto filtering
I believe the main thing to consider beyond just correctness of your email server configuration is that large email providers evaluate the reputation of a sender’s infrastructure. So for example, if your mail server has an IP address associated with large-scale spammers, that would hurt reputation. And if you are your own ASN or something, you have to build your reputation from nothing. I believe I mostly dodge this problem by just putting my email server in Hetzner.
I use mailbox.org but if you have your heart set on self hosting id say stalwart is a good selfhostable email service
Mail is something I don’t want to touch. I use mailbox which is hosted in germany for some years now. For calendar & contacts I use the built-in Nextcloud apps, they also work pretty well
Edit: I self-host Nextcloud, so contacts & calender are on my private server
Same here in terms of don’t want to touch mail. I use migadu, swiss company hosting in france. Works flawlessly. There was a good blogpost some time ago comparing mail services, let me check… there it is: Blogpost
Shout out to Migadu, great service!
Where did you find where are they hosted? I couldn’t find it on their website last ve looked them up. Too bad they only accept $, I had considered them heavily because I like their mindset regarding inbox/folder.
I went with Soverin to have unlimited alias included in my plan.
https://www.migadu.com/procon/#in-switzerland-but-servers-are-not
This may come as a surprise, but we do not host our servers in Switzerland. Current data centers are located in France. We may in the near future add Swiss data centers too but this is not our priority.
We find EU privacy laws much more elaborate and restrictive than the Swiss ones. Switzerland used to be famous for banking secrecy, but that has nothing to do with digital data.
Yea, me aswell. Also in the mailbox and am really happy with their service, but don’t they use Open-Xchange? I don’t think its Nextcloud.
Mailbox uses Open-xchange, but the user most likely has nextcloud selfhosted.
Instead of hosting your own mail server, use a service like SimpleLogin. It allows you to configure custom domains on the paid plan and it simply redirects any email sent to an email alias to your actual inbox. So you never share your actual email address. Secondly, if tomorrow you change email providers, all you have to do is change the destination behind those aliases for the custom domains. It also does catch-all aliases so you can make them up on the fly.
yeah, no thanks. my whole goal is to move away from unreliable megacorps hosted email, not make my domains rely on them too.
You don’t specifically have to use SimpleLogin. I only suggested it because I use it. You could use a number of other services like AnonAddy, Forward Email, Firefox Relay, etc. for aliases. For email hosting, you could choose any provider of your choosing, doesn’t have to be a mega corp.
Hosting your email servers comes with a lot of administrative overhead like maintaining availability, reputation, certificates, quotas, DNS entries, DKIM, DMARC and SPF, etc. If you’re willing to go that route, then Mail-in-a-box is a good way to do it. There are some other options here that you can look at too - https://github.com/awesome-selfhosted/awesome-selfhosted#communication---email---complete-solutions
If you happen to successfully run your own mail server, please do report back and tell us your experience.
I moved away for self hosting email, but my advice would be to look at anti spam providers. Most can act as both an incoming and outgoing filter for your emails, and will hold on to email if your mailbox host is down. It also means for outgoing you don’t need to warm up an IP to have your messages accepted.
Of course you still need to setup SPF/dmarc/etc but it takes out some of the fuzzier parts of email deliverablity…
I’ve self-hosted email for over 20 years but I’m now moving to Fastmail for two reasons: (1) succession, I’m the only one in my house that understands how it works, and (2) email is never fully under your control and the large providers may decide to filter/drop email from your domain. But this is self-hosted, and I did enjoy my years doing it, so go for it if you want. I had good luck with OpenBSD/OpenSMTPD/Dovecot stack. Good luck!
Edit: I forgot to mention you can do a hybrid approach; handle receiving yourself and use a service like smtp2go.com to do delivery.
I’ve been using smtp2go for the past 2 ish years for outbound email, and it’s been great! I have no complaints.
I host my email, just not at home but on a rented server.
Here I documented it all https://wiki.gardiol.org/4-e-mail-hosting
It works, its been working for decades now. Never had significant issues…
Email is quite resilient. Servers keep trying to send again and again messages for hours before they give up… So a backup server is not even really required.
I repeatedly see people saying “don’t host your own mailserver”. So what are we supposed to do? Just give up and let megacorps own all of our mail? I get it, it goes to those servers anyways. F-that. I’m not giving up yet another service to them. Personally, I have a VPS with racknerd and use docker mail server. Been using it for a couple years now and no issues so far. Just make sure your DKIM/SPF records are good.
Self-hosting email is like making your own butter.
It’s possible, but most people don’t want to take it on themselves.
Calendar and contacts I’d argue are good candidates to self host. If a config is off and you can’t access them for a day or two, does it matter?
But if email is down, you risk missing something important. If you have a trust issue and everything you send is getting flagged as spam? Hard and slow to fix.
If the problem you’re trying to solve is Flaky and Unethical Big Tech, I would look at finding another, smaller provider and paying for it. Rolling it yourself is a great way to learn entirely too much about mail servers and spending way too much of your free time on it.
I’m hosting my own, on a dedicated Hetzner server (used for a bunch of stuff, “dedicated” as in “only me on the hardware”), using nixos-mailserver.
I’ve a 10/10 score on all the spam tests / deliverability tests I could find. The only deliverability issue I’ve ever had is t-online, but only because they require you to apply for being allowlisted, lmao. (Was one quick email to do that though, so… fine.)
It’s been a couple of years of smooth sailing now, so I’m not super worried anymore; esp. in the beginning though, it was a bit anxiety-inducing (and I did cause some downtime by fucking up my bootloader and needing a KVM from Hetzner at one point, that was a very sweaty evening not least because the email address I had put for contact info was, well, handled by the server that was down. Btw Hetzner email you the link to your KVM. Fun times!).
Anyways: I’m really happy with my setup now, in all aspects. Calendar and contacts self-hosting is also great.
But, just so you know: you will not be able to do this on your residential IP. Doesn’t matter how hard you try, it will not work. You’ll be able to receive emails no problem, but if you’re lucky you’ll end up in people’s spam folder. More likely, the recipient server will just outright reject or discard your mail.
How much do you spend on the hetzner service?
~46€/month for the server via their server auctions (triple 512GB SSDs in a zpool, 64GB RAM, i7-7700, in their German datacenter with unlimited Gbit internet… not too shabby!) . Unfortunately, looking at them now, they’ve shot up in price (wonder why… 🙄).
That’s overkill though. As long as you can get something with full root access and a dedicated IP (which includes their VPS offerings, I am pretty sure), you’re good.
I know everyone is already glazing Hetzner, but let me just add to the pile… I’ve been customer at a lot of (mostly web, sometimes vps)-hosters over the years, but I don’t think I’ll ever switch away from Hetzner again. Even if they raise prices further. They give you full control, don’t try to upsell, and more importantly, have excellent support.
As others have mentioned, hosters often block outgoing email ports. This includes Hetzner. Sent them an email, 5min later, ports are open. Need a KVM? Press a button, it’ll be ready in a couple of minutes, once a technician has walked over to your machine and plugged it in. Are you as stupid as I am and have no access to the email account receiving the KVM link? Call support, no queue, immediate problem resolution. One of the SSDs looks like it’s gonna give out soon? Press a button in the dashboard, a technician will come around in a couple of minutes and swap the drive, free of charge.
IDK it just feels like I’m getting enterprise support for consumer prices.
Also I just now realize you only asked for a price, so everything beyond the first sentence is just me rambling.
I sure hope you’re using that for a lot more than email.
Yes, I am 😄
Though I originally did get this for email. Wanted a dedicated server with triple SSDs for redundancy, and the i7+64G was the cheapest option!
Ah, different times.
But yes, I’m regularly maxing out CPU + RAM for hours on end.
Just a mailbox at IONOS for 1x Business plan and 25 “free” (2gb) mailbox.
Costs me 7€ per month. And so far almost zero downtime.
What the fuck you are paying 7 Euro PER MONTH for your mailbox?
26 mailboxes? ¯\_(ツ)_/¯
If it works and is hosted on domestic servers, i am fine with it.
So far no issues with IONOS as my provider.
Yeah 26 Mailboxes with 2GB storage for each … You know that there are Catch-All-Adresses right? You can receive everything@tld into a single mailbox.
🤷
I’m going back to my KISS mindset.
I got the Mozilla ThunderMail invite and using ThinderBird for the client. It’s all basic, direct and just works.
I’m really tempted, but seeing the Mozilla graveyard, I’m weary of switching properly to it.
True…. But to be fair, some of those ended up coming back and getting integrated within their browser and like the Send, that’s in thundermail now.
Side note, I didn’t know they made a mobile OS and it’s still alive within another fork.
I think a James Bond title fits Mozilla, “die another day” :P
I have run my own mail server for 20+ years. I set up everything correctly, including DKIM and DMARC. I have had the same IPs for 10 years. I send <100 emails a month. A few years ago Google started putting most of my emails in spam, and Microsoft started silently deleting them. They will not fix it. I had to start paying for a relay for outgoing messages.
Use migadu.com.
My domain’s mail is hosted at https://purelymail.com/ $10/year. They seem to run on AWS hardware, so it’s not free of US big tech. It’s dirt cheap, but I’ve never had any problems, either receiving or sending. They have very clear instructions for getting your domain’s mail set up.
Mailo.com is a privacy friendly email provider in France. As far as I know they do only email.
Recently they upped the prices a bit, my account is from before that, and payed 60 euro for five years.
I self-host it with https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.
Email is a very old protocol, it originates from the time when computers were connected only occasionally. It is very much possible to come an agreement to power up the antennas at something o’clock every day to exchange emails, and the rest of the time they just sit in the queue.
Practically speaking, if your home lab is down for something like 12h, it should not impact email delivery much at all - the sending servers would just keep retrying. Usually for 48h. From https://www.rfc-editor.org/rfc/rfc5321#section-4.5.4.1
Microsoft documents this: https://learn.microsoft.com/en-us/defender-office-365/mail-flow-about#mail-flow-delivery-faq
I guess technically they’re RFC-compliant, but 1 day is not as much as I’d like…
Were you actually able to get good domain reputation with your sever on a residential ip?
No idea. I keep hearing the term, “IP reputation”, but I don’t know any official registry where I could look up mine.
"google-site-verification=<base64-or-what>"All told, I can deliver email, AFAICT. If it lands in spam, well, tough luck - email from large providers also does.
Mail is a piece of software I won’t bother self-hosting. I already tried, put in it a lot of time, trying to get my IP address considered safe because it was banned 15 years before I had it, to only have a third of my mail sent successfully received. It is not worth the effort and I switched to proton and recently to infomaniak.
I run mailcow on a vps on a smaller, reputable, European host. I started out with Hetzner but there I had problems with delivery due to a bad neighbourhood. It really helps with a host that cares and take abuse seriously.
After moving it’s mostly been good. I don’t have any issues with outgoing mail, all seems to land fine on both gmail/outlook etc. It’s pretty low effort, just need to stay on top of upgrades since there are internet exposed services.
Here is also a good post about best practice for smaller servers: https://bridge.grumpy-troll.org/2020/07/small-mailserver-bcp/
I have a filter that encrypts all incoming mail with my pgp public key, for added security (this is not bullet proof as it has to sit after rspamd but should make it harder to read any mails in case of any kinds of breaches).
Mailcow encrypts mail by default
Yes, but the decryption key is on the server.
With pgp only the public key is there.
Also it protects against say leaked IMAP credential.
I host my email on a hetzner VPS using dovecot+postfix and thus far no issues.
I don’t really understand why people are so against it, for me it took an evening to set up and haven’t touched its configuration since.
I do excactly this too. My personal domain has been around since 2008 and my setup has a few domains from friends too. I’m running ispconfig to manage the whole mess and it’s really not that difficult. Getting your server removed from blocklists every now and then is annoying but at least my emails aren’t feeding some marketing machine and, at least for the last 24 hours, my service availability is better than Microsoft can do.
I self-host a metric fuck tonne of services and (with my extensive email background) I choose to outsource my email services.
You CAN do it today. But should you? Given DMARC, SPF, etc… No.
Since I left Gmail’s free GAFYD feature, I moved to Fastmail (Australian) years ago. Does it cost money? Yes. Does it do everything I want? Yes. Does it have features Google would never provide? Yes.
Do I have any reservations or regrets? No.
Docker mail server dms on hetzner , if you set your dns for multiple mx you can have a fallback at home or another dms in a different data center and replicate it with dovecot sync
I host a mailcow instance. Had some issues getting the IP address the VPS assigned me removed from some blacklists, and some companies whitelist email domains and only let you get their emails if you use outlook, gmail, etc., but those are few. Unfortunately it’s often medical stuff that thinks they’re being “secure” by only sending mail to systems that steal your private data for profit, but not much you can do. And that happens with any email software if you use your own domain as your email address.
The fallback part is the hardest bit of what you’re describing, because true active-active mail is a lot of work for one person. A simpler setup that gets you most of it:
What all is down from Microslop?
For Calendar/Contacts I use baikal. I thought about hosting my own email because my host really had me over the coals for what I was doing with it, I started researching and thought it could be fun. I bought a throwaway domain and had one of my static IPs setup for the port 25 being opened up I spent a week trying to do things, most of the Lemmy posts I found and most of the personal things like blogs I was looking for said do not self host your own email.
My previous host was HostHero, they did not have a wildcard email function so I needed to buy the unlimited email package because I do not use the same email address or password for anything. My new host, easyDNS, does offer a wildcard option so I can have unlimitted email addresses.
Why do I use a a different email address for everything? I can just close an account once I no longer use the service or once they start getting spammy, I get next to no spam.
I am not a EU citizen, I am Canadian! So when Trump came in and did his whole 51st state BS I jumped on the boycott Amarica train fast so the Apple services I was paying for stopped, one of which was hide my email so I got Proton, I found out the CEO was a simp for Trump so I was going to host my own and as I said I discovered it is not a simple thing even if I was going to do just one email address.
But I strongly do suggest find a host in the EU, that offers a wildcard option. All though it sounds like you have a good handle on things email is something else.
This is really useful and I do this too with the service / product name as the “name” (ie
microsoft-mail@mydomain.tla)It’s interesting to see how emails are sold / transferred over time…
I have a formula (service name)-(local slang)(three random numbers)@mydomain.ca that way I can use free trials if I still need the service (I have only done this 2 or 3 times, not saying that I wont do it again but hey when in Rome) it also allows me to have multiple accounts with the same service for different purposes.
If I use a service than stop, forget about it. The email is almost definitely going to be sold so when I get spam I will close the address, if I stumble upon the service again and think oh cool I should try this vaultwarden via bitwarden may say here are your sign in credentials I will try signing in and it will tell me this account is no longer active so I need to create a new one.
My orignal plan was (service name)@mydomain.ca but than I came across the wanting extended free trial so I thought (service name)2@mydomain.ca, some are fine with that some are not. I like throwing in the fluf just to keep bots off of my trails.
Sign in to comment. Sign in