I’ve tried to roll my own linux-based email server in the past (postfix, dovecot, dspam, squirrelmail, etc), and although it all worked, just barely, it had many quirks and it was a nightmare to manage. And I have a 4-year B. Sc. in Computer Science, plus 6 years experience as a Linux Sysadmin! So yah, I strongly vote “don’t” (even though we all feel a strong sense of entitlement to “own” email just the way we’d like). You’ll waste monumental efforts that could be better invested elsewhere (hint: in some successor technology to email).
Free email services like Gmail have spoiled people into expecting the moon from a technology which was never originally architected to have all those bells and whistles, and it’s very hard to retrofit them all. Anyone who tries to catch up to a service like Gmail will always be running on a treadmill, as Google, etc. keep raising the bar whenever they like, as they have huge, huge budgets to “just make it work”, unlike any Open Source community, which must sluggishly build consensus to get anything done on a larger scale.
I agree that email is critical and will never really go away. But my perspective on email has changed drastically now, which gives me much more sanity. I consider email to just sort of be a “back channel”, which is used to sign up for services which are somewhat email-like, but much better (in the way of security, and cohesiveness of many smaller services as an entire, comprehensive service, etc.). I virtually never use email to talk to actual humans any longer. Email mostly only helps me sign up for and manage accounts with other messaging services such as Signal and Wire (not to mention my bank, my governments income tax agency, etc). To me, this mere “back channel” need not have any place in Nextcloud, which is where actual humans get things done.
This is similar to how many people use their smartphones now. I know people now who don’t place actual POTS calls any longer with their smartphones. They instead message with WhatsApp, Signal, Wire, etc. Sure, SMS is still needed, as a “back-channel” to signing up to those services (for example, once in a while they want to send you an “activation code” over SMS). But that conventional POTS cell service is pretty much just a necessary throwback, compared to the thing people really want to use their smartphones for, which is to say, for various internet-based services, over mobile data connection. I’m connecting over cellular right now, to type this, in fact.
A fantastic example is this forum we’re all chatting on right here. This forum is web-based. Not email-based. Yet email is how accounts can be ocasionally managed, in a “back-channel” sort of way (say, in case you lose your password, and need a reset).
When it comes to email, I’m currently “getting by”, by using 1) Protonmail, 2) tutanota.com, another free email service, and 3) a custom linux email server with a hacked-together combination of Qmail + IMAP + Roundcube. And I’ve given up hopes to integrate that with Nextcloud until further notice.
I’m happy enough with this “just getting by” email arrangement for now, which is a protection to my hair turning prematurely grey. I’m patiently waiting for Zulip to mature more, so I can use it in the way that Slack is oftentimes used. I’m optimistic that Zulip, once matured, will become the thing that email wishes it was. Everyone else no doubt has their own favorite technology that they hope will similarily be the sucessor to email (although email will never die entirely, as it’s needed to be that necessary “back channel”).