this post was submitted on 18 Feb 2025
113 points (100.0% liked)

Selfhosted

42670 readers
744 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
top 25 comments
sorted by: hot top controversial new old
[–] AmbiguousProps 50 points 2 days ago* (last edited 2 days ago) (3 children)

It should be noted that email servers, no matter the setup, require you to follow strict standards to achieve proper delivery. It's very easy to get blacklisted, and it's next to impossible to get off of said blacklist once you're on it.

I used to host my own mail server with this, but it got to be too much to get my emails to actually send. I was always wondering if my email was actually delivered or if it was silently bounced or sent to spam. Email is the only thing I'm not willing to self host.

[–] null_dot@lemmy.dbzer0.com 1 points 13 hours ago

I'm absolutely in the "don't self-host email" camp. That said, I think it could be done reliably if you wanted to use someone else's SMTP server and let them worry about deliverability. As in, have your mx records on your domain route to your MTA and dovecot, but set your DKIM and SPF records to match a third party SMTP server. You could use mxroute as an SMTP server very cheaply. There are others like the email API type services. I still can't think of why I'd want to self host with all this drama but just an idea I've heard.

[–] TK420@lemmy.world 5 points 2 days ago (1 children)

So is that why send mail won’t work for sending myself emails about a system? Once upon a time you could do that, but now no more is what I’m reading between the lines, sans a proper mail server??

[–] AmbiguousProps 3 points 2 days ago

Yep, pretty much. It used to be doable, but these days it's very difficult. It's certainly not impossible, but one slipup and you could get on the deny list forever. It's just not worth it, since emails are usually pretty mission critical, imo.

[–] madame_gaymes@programming.dev 12 points 2 days ago (1 children)

Yea, if you are not willing to be meticulous about learning/understanding all the DNS stuff (SPF/DKIM/DMARC), and plan to host this at home, don't.

I ran this same system for a very long time on a VPS and had no problems with blacklists, but I'm also a career systems engineer that maintained enterprise systems and exchange servers.

Also note how I am speaking of MIAB in the past tense...

I think the better option is to try and avoid email as much as you can, just like SMS. Outdated tech and not secure. At that point, any ol' existing email service is good enough.

[–] null_dot@lemmy.dbzer0.com 2 points 12 hours ago (1 children)

I don't think the SPF / DKIM / DMARC stuff is overly complex nor the core of the problem.

In my case it was recipients with bonkers microsoft exchange servers that just had weird ideas about who should be sending them emails.

For example, one thing that tripped me up forever ago was grey listing. Apparently the receiving server just wouldn't acknowledge the sending server for an arbitrary period of time, say 12 hours or so. Spam senders would usually give up long before then, while a legit server would keep trying because it's legitimately trying to deliver an actual email.

So my email-in-a-box type self hosted set up was fine really. Compliant you might say. But to send emails to this one in a thousand recipient I had to investigate what was going on and reconfigure things to ensure their server would interact with mine.

Another thing that can happen is that spammers just put your email address in the "from" field and fire off a few million emails. Obviously the DKIM signatures and SPF won't match but it still just makes your future legitimate emails look spammy. Having the credibility of a larger organisation goes a long way in this type of instance.

[–] madame_gaymes@programming.dev 1 points 5 hours ago

I don't think the SPF / DKIM / DMARC stuff is overly complex nor the core of the problem.

It's not the core of the issue, but the average joe that is a hobbyist self-hoster it will be.

IMO, the core issue is that there is no standard whatsoever. People just do whatever the hell they want with these records, pretty much. Microsoft and Google do it differently than each other, even.

The only solution for me is that we move on from email as a society.

[–] Semi_Hemi_Demigod@lemmy.world 41 points 3 days ago (2 children)

Step 1: Cut a hole in the box (open a port)

[–] miss_demeanour@lemmy.dbzer0.com 23 points 3 days ago (2 children)

I drank a glass of port.
Now what?

[–] Semi_Hemi_Demigod@lemmy.world 8 points 2 days ago

Join your ship’s surgeon for an evening of Boccherini duets

[–] AbidanYre@lemmy.world 1 points 2 days ago

Shotgunning box wine?

[–] tate@lemmy.sdf.org 5 points 3 days ago (1 children)

Isn't that step two?

I feel like step one was "get a box," but I could be misremembering.

[–] nokturne213@sopuli.xyz 7 points 3 days ago* (last edited 3 days ago) (1 children)
[–] tate@lemmy.sdf.org 2 points 2 days ago

Sure enough! Thanks, that was fun to watch again.

[–] mesamunefire@lemmy.world 9 points 3 days ago (2 children)

Ive used this in the past to host an email server. Eventually, my ISP actually stopped allowing people to use mail ports, so I had to discontinue. But it worked very well when I used it many years ago.

[–] 9tr6gyp3@lemmy.world 5 points 3 days ago

Its perfect for a small VPS. Been using it for years.

I do occasionally get places where my email simply will not send to them, even though it follows every email standard properly and isnt blacklisted. For those rare occasions, ill use a third party email address to send, which then forwards everything to my main email.

[–] jagged_circle@feddit.nl 2 points 2 days ago

Call them and tell them to open it. It probably isnt legal for them to close the port if you ask them to open it.

[–] rimu@piefed.social 5 points 3 days ago (1 children)

MailCow is similar except uses docker. I expect that will mean easier maintenance as it is less tightly bound to the underlying OS.

[–] ikidd@lemmy.world 2 points 3 days ago

I think Mailcow is a fair bit further along in features than this. I used this for a short bit but wasn't overly impressed, and you are right about how running a docker stack is less hassle for updating.

[–] hendrik@palaver.p3x.de 2 points 3 days ago (2 children)

I've always been looking for an all-in-one mailserver with a few added features like mailing lists and something like AnonAddy (anonymous mail forwarding). Sadly there doesn't seem anything like that out there. So I have to configure postfix and dovecot myself. Or make ends meet with a bit more basic features.

[–] dukatos@lemm.ee 4 points 2 days ago
[–] words_number@programming.dev 5 points 3 days ago (1 children)

Check out stalwart mail! Not sure it has all the features you need, but it is really flexible through scripting and has got a nice admin web-interface!

[–] hendrik@palaver.p3x.de 1 points 3 days ago (1 children)

Thanks, and I happen to already be aware of it. It doesn't have any of that. And it's more complicated to hook it into other things, since the good old postfix is the default case and well-trodden path. I think I'll try Stalwart anyways. It's a bit of a risk, though. Since it's a small project with few developers and the future isn't 100% certain. And I have to learn all the glue in between the mailserver stuff, since there aren't any tutorials out there. But both the frontend, and the configuration and setup seem to make sense.

[–] words_number@programming.dev 3 points 2 days ago

If you need to hook it up to other stuff (where there is a solution using postfix), it's probably easier to stick with postfix. As an all-in-one mail server I prefer stalwart over docker-mailserver, mailcow, etc. because it's one unified software with sensible configuration instead of a clusterfuck of services put together using string and duckt tape.

[–] jagged_circle@feddit.nl 1 points 2 days ago