Andrew Kelly (creator of Zig) highly recommends Simple NixOS mailserver. Claims it runs with no hassle and delivers mail flawlessly. This is neat, but still very complex compared to maddy. Nix with its immutable OS does manage complexity nicely in a reliable way. However, are we solving the right problem? Maybe we should be avoiding some of this complexity in the first place such that we don’t need Nix for things like a mail server …
As I brush my shoulders with Nix, I am more convinced that its a solid platform to build Linux distros of future and today’s demands from system maintenance point of view. Nix the language is pretty solid and its functional approach is awesome, your whole system is an expression. I am going to give it a shot in a VM as I have installed NixOS with KDE/Plasma5 and its a breeze to get going. Maybe, I will mix my archlinux and Nixos experience. I know AUR is powerful and with Nixos I will have to give up some of that but its perhaps not a big deal. I think you can replace Ansilble if you start using NixOS for server loads.
Due to some problems with a recent Maddy upgrade, I switched to this mailserver setup over the weekend and I’m very impressed. ~20 lines of declarative config and I have a well integrated mail server with the following features. Spam filter is exceptional out of the box, but moving filters to Junk triggers Bayesian learning on the server. This is neat as you can train mail on any client, instead of having to relay on Bayesian filtering in a client like Thunderbird, which does not work all that well in my experience. Also like being able to declaratively set up accounts and aliases in a simple config file instead of messing with databases, etc.
After a couple weeks of using this, the experience has been excellent!
- super easy to add new users/aliases (a few lines of declarative config)
- SPAM handing is amazing – I get no nasty/stupid spam messages and it does pretty good at handling the rest. Inbox and Junk folder are amazingly clean – now sure how it’s doing it, but is the best experience I’ve ever had for spam – even better than gmail.
- delivery is flawless. Never have problems getting email delivered. I ran into several problems with Maddy, and when I looked into it, I would typically find the recipient did not have their mail server configured correctly. However, I don’t want to deal with this – even if their mail server is broken, I want my mail delivered.
- fast and reliable. Operations from mail clients like Thunderbird are very fast and reliable.
- easy to set up SPF, DKIM, DMARC, etc – all the stuff that helps get your mail delivered.
This is how mail should be – sane defaults, and easy to configure the rest …
Projects like Maddy are still the future and will eventually get there. A single binary written in a modern/secure language has the potential to be much more secure/stable than a handful of separate services written in C/C++. For now, I’m glad there are tools like Nix to tame the monster.
Recently subscribed to several OE maillists with my biz address (trying to move more stuff from gmail to biz email), and at first it was putting a bunch of Yocto mail in the spam folder. I moved them back to the inbox, and since then I have not seen any in spam, so it seems to be learning on the server based on my client actions.
One reason I want to use this setup more than gmail is that the experience in Thunderbird is so good. Everything is so fast and snappy. I filter a lot of messages to folders and I simply view the folder, read what looks interesting, and then either delete or “mark as read” the rest. There is nothing that beats a local app and data for speed, and when it comes to processing email, speed matters. Similar to the same reason I still use Vim (Neovim) – there are no delays when I hit a key.
I could connect Thunderbird to Gmail which would help some, but you still have the fundamental problem that the Gmail server is slow compared to a dedicated mail server – instead of Imap operations happening instantly, there will be longer delays.
Gmail and various cloud services have very compelling features, but you need to optimize for what you do the most. If most of my time in email is spent browsing and reading mail, then I need to optimize my toolset to make that as fast as possible. Searching and indexing may be better in Gmail, but I spend relatively little time searching emails, and if you spend a lot of time searching emails, then … well, this is a different topic