this post was submitted on 14 Feb 2025
48 points (92.9% liked)

Selfhosted

50062 readers
303 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
48
Good mail server for selfhosting (lemmy.cronyakatsuki.xyz)
submitted 5 months ago* (last edited 5 months ago) by crony@lemmy.cronyakatsuki.xyz to c/selfhosted@lemmy.world
 

So I'm migrating stuff from my old server to a new provider and only thing left is email.

The problem is I used luke smith's emailwiz script ( the script and setup itself isn't a problem ) because it uses system users for managing users with dovecot and friends to setup a mail server.

So now I'm looking for a new email server to selfhost (preferably docker/podman) that in the future I can easilly migrate.Would also love if somebody has a reccomendation on how I could backuo and import emails from the old server.

NOTE: I use caddy as webserver, so the server should have a simple way on getting ssl certs, or abikity to easilly make use if caddy one's.

top 26 comments
sorted by: hot top controversial new old
[–] smiletolerantly@awful.systems 11 points 5 months ago* (last edited 5 months ago) (1 children)

It's a bit unconventional maybe, but I vote simple-nixos-mailserver - IF you are curious / willing to learn nix. It's essentially just sanely configured dovecot, postfix, rspamd.

My config for those three combined is about 15 lines, and I have never had an issue with them. Slap on another 5-10 lines for Roundcube as a webmail client.

Since it's Nix, everything is declarative, so should SOMETHING happen to the server, you can be up and running again super quickly, with the exact same setup.

[–] crony@lemmy.cronyakatsuki.xyz 3 points 5 months ago (1 children)

I use nixos on my desktop, the server is a debian one but might be good to install nix on it.

[–] smiletolerantly@awful.systems 2 points 5 months ago

In that case I can really highly recommend it. Nixos on the server is fantastic anyways, and the only hurdle to recommending simple-nixos-mailserver is that most people are not familiar with nix... 😄

[–] k4j8@lemmy.world 9 points 5 months ago (1 children)

Stalwart is gaining momentum. I haven't used it, but it's worth a look. https://stalw.art/

[–] truthfultemporarily@feddit.org 3 points 5 months ago

This is probably the way, because a traditional "mail server" is actually 4-5 different servers working together.

  • postfix for SMTP
  • dovecot for IMAP
  • amavis to plug in..
  • spamassassin as anti spam
  • clam-av as antivirus

And they can all be very easily misconfigured to break everything completely. Great learning experience though.

[–] muntedcrocodile@lemm.ee 7 points 5 months ago (3 children)

I've never messed with it but I've heard mail servers are a pain in the ass.

[–] Xanza@lemm.ee 2 points 5 months ago
[–] Joelk111@lemmy.world 2 points 5 months ago

Yeah, all the threads I came across when I looked into this were like "Self host everything! Except email" so I haven't looked into it.

[–] quokka1@mastodon.au 1 points 5 months ago

@muntedcrocodile @crony I used to run Exchange and have had various others for my 2 person house. Sometimes overkill. These days I don't think I'd bother running mail at home, even on reliable hardware, a decent connection and with a static IP. Hassles with getting on/off blacklists even with all DKIM, SPF etc being in place are things I don't want to deal with these days.
My incoming mails are a couple of bank notifications, monitoring alerts and notes from schools and sports clubs. A lot of system admin for not much actual use.
I might revisit it once the winter evenings come in.

[–] Smash@lemmy.self-hosted.site 5 points 5 months ago (1 children)

I've been using mailu for years without probelms

[–] witten@lemmy.world 1 points 5 months ago

Same! Okay, not without problems, because running a mailserver isn't maintenance-free. But Mailu has been generally solid and it works with Docker. (And Podman, unofficially.)

[–] Xanza@lemm.ee 4 points 5 months ago
[–] sxan@midwest.social 4 points 5 months ago (3 children)

I was going to ask if anyone had experience with Maddy, which is an all-in-one solution I've been eyeballing for a while.

Getting DKIM and postfix set up correctly was such a PITA, and then dovecot, I'm nervous about having to go through all that again and fretting about accidentally configuring an open relay, so I haven't tried it yet. But it looks nice, and has been around for a couple of years.

[–] andocas@lemmy.world 2 points 5 months ago (1 children)

I've been using Maddy for about a year. I haven't had any complaints, although my use case is very basic (running on bare metal, with just a handful of inboxes). DKIM is never pleasant but the Maddy configuration is straightforward enough.

[–] sxan@midwest.social 1 points 5 months ago

Thank you. I may try it; postfix seems to give me grief ever other update, like they can't leave the damned config file alone.

[–] ikidd@lemmy.world 1 points 5 months ago (1 children)

https://mxtoolbox.com/ will help a lot with making sure you're configured correctly.

And look at Mailcow if you're nervous about setting up another server, it's bulletproof and mature.

[–] sxan@midwest.social 2 points 5 months ago (1 children)

I miss the old days, before you had to worry about spam.

I'm not OP, and I have everything set up fine now; Mailcow would replace what I currently have with the same software components, so I don't see any value there - for myself.

Something like Maddy is completely at odds with the Unix philosophy, and yet I've fought enough with postfix to dislike it enough to want to try an all-in-one. I dread the DKIM setup, though; that took so much time, and the mail server configuration wasn't the hard part. Maybe now I've got it configured for my domains, switching email server software will be easier.

[–] ikidd@lemmy.world 2 points 5 months ago

Mailcow was effortless and I've never had to intervene in the stack. And after 20 years of fighting postfix and dovecot, that was a pleasant change. I can see why you'd want to try something different, but don't expect it to be easy.

[–] catloaf@lemm.ee 1 points 5 months ago

fretting about accidentally configuring an open relay

That's easy enough to test. Try sending mail from the Internet to an address outside your domain, both from a real sender and a sender spoofing your own domain.

[–] ikidd@lemmy.world 4 points 5 months ago

Another vote for Mailcow-dockerized. Used it for about 5 years now and never had a problem.

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

I use OpenSMTPD for mail delivery, dovecot for IMAP, fdm for filtering and some tool I forget the name of for DKIM signing.

To bulk move mail around, just move the maildirs.

(Hosting email is a pain)

[–] Shimitar@downonthestreet.eu 2 points 5 months ago

After 20+ years of hosting my email in a similar way (postfix...) I decoded to explore the "all in ones" like stalwart and mailcow.

Stalwart looks promising because its a new approach, supposedly more streamlined and efficient. Will post back in a few months.

I am not worried about stalwart dual license, the overall feeling seems to be of trust.

[–] lolonaut@discuss.tchncs.de 2 points 5 months ago

I have used mailinabox.email (I think there is a docker version of it) and am quite happy with it.

[–] Shimitar@downonthestreet.eu 2 points 5 months ago

I have started testing out stalwart, seems pretty nice, bit way too early to give you reasonable feedback.

If you are looking for an innovative approach to email server stalwart is the new boss in town.

If you want proven and stable, mailcow might be your easy choice.

Both can be deployed with containers, I did with podman.

[–] WhyFlip@lemmy.world -1 points 5 months ago (1 children)

If only this wasn't asked 50 times in the past 7 days. SEARCH.

[–] Shimitar@downonthestreet.eu 3 points 5 months ago

A forum is good for searches. Social media is good for blind repost and "me me me" posting.

That's life

So sad we abandoned the forum approach.