Mox – modern, secure, all-in-one email server
314 comments
·March 5, 2025QuadrupleA
citrin_ru
> postfix & dovecot's 20+ years of legacy cruft
That's not my experince - I use postfix and dovecot for years and they are rare examples of high quality software to me. I don't see any cruft. They are flexible which make learning and configuration harder compare to opinionated software where most decisions made for you by a developer and you have not choice but to accept them. I myself view sometimes see flexibility as a disadvantage but IMHO they strike a good balance. Postix often criticized by Exim user for not being flexible/configurable enough. And they don't force to use unix accounts, it's just one of options.
Having said that I would agree that using a mail server which combines all in one package is easier than unix way with multiple specialized parts combined. For a novice it could be a challenge to stichs (configure) multiple parts together, especially if you don't know how to test each part separately and blidnly follow some how-to.
Where you can find plenty of legacy cruft is mail standards and implmenting them correctly is not an esty task that's why I trust Postfix and wary of anything new until it battle tested on a large number of servers.
QuadrupleA
You may have just forgotten the pain of the learning curve? Admittedly postfix & dovecot are way more sane than rspamd. But their whole default config (and something like 50% of the options and documentation) are oriented around UNIX system accounts for each of your mail users, which seems insane and 80s-era to me (let's go dial up to the mainframe at 300 baud and see if we have any mail). It takes dozens of pages of documentation to orient yourself away from all that, understand Postfix's "address classes", that you generally want "virtual mailboxes", etc. No support for DKIM, except through sendmail-invented "milters", of which Postfix heartily recommends you to OpenDKIM, a project which hasn't been touched in 10+ years, doesn't support EC signing, is not packaged on most distros, is documented on a outdated non-https site with sparse even more out-of-date plaintext documentation, referring you to a defunct FTP site to download the code, etc. And milter requires setting up a UNIX or inet socket and tedious configuration, etc. etc.
Poor support for SASL, at least for mail users looking to god forbid send an email and relay it to the internet, and password-protect against random spammers doing the same, referring you instead to Dovecot SASL - also legacy cruft (partly the SASL protocol designers' fault), SASL has numerous "mechanisms" but nearly everybody uses just the PLAIN mechanism, ensuring a TLS channel is established first, which is about 10 lines of code to implement.
Just a ton of unnecessary legacy cruft IMHO.
account42
> No support for DKIM, except through sendmail-invented "milters", of which Postfix heartily recommends you to OpenDKIM, a project which hasn't been touched in 10+ years, doesn't support EC signing, is not packaged on most distros, is documented on a outdated non-https site with sparse even more out-of-date plaintext documentation, referring you to a defunct FTP site to download the code, etc. And milter requires setting up a UNIX or inet socket and tedious configuration, etc. etc.
OpenDKIM has been working fine for me for the last 10+ years. It's also in the default repos of my distro.
> Poor support for SASL, at least for mail users looking to god forbid send an email and relay it to the internet, and password-protect against random spammers doing the same, referring you instead to Dovecot SASL - also legacy cruft (partly the SASL protocol designers' fault), SASL has numerous "mechanisms" but nearly everybody uses just the PLAIN mechanism, ensuring a TLS channel is established first, which is about 10 lines of code to implement.
SASL works fine for me with Postfix and Dovecot, including sending restricted to authenticated users. Also CRAM-MD5 was recommended over PLAIN everywhere even back when I set this up.
bsdice
Took me weeks to perfect our own setup based on Postfix, Dovecot, Roundcube with some patches, rspamd with attachment-type whitelisting and a bazillion other features, clamav with extra patterns, plus the many tweaks and enhancements you need to dig out from obscure places.
Like fts-flatcurve, an archive plugin for dovecot that can find stuff in 30 years worth of mails in a second, over IMAP in Roundcube. Or rspamd settings to blacklist not a single IP but an entire ASN of misbehaving colo clients. IMAP with namespaces is also a true pain to configure. Or setting bzip2 compression for an auto-expunged journal for spam, and archive without expunge. Painful.
If you made it this far, you will find that your IP address is tainted. So choosing a hoster that keeps his backyard clean from spammers is necessary, otherwise you will suffer by association. Did I mention SPF records in DNS.
So I consider our server a piece of art. 30 years in operating systems certainly helped.
conradev
There is also https://github.com/stalwartlabs/mail-server
elliotali
Using this now, and love it. For easy mail reception and sending, mail-in-a-box does it all for you (if you don't mind opinionated, but stable) and Stalwart does it all for you and is highly configurable, including an oauth2 server and more. Keen to try Mox, but I think it went viral and their website accidentally got ddos'ed.
guillermin
I've been using mail-in-a-box for 5 years and I couldn't be happier. For me, stability is the #1 concern for an email server, and mail-in-a-box is really set it and forget it. I also like that it includes CalDAV and CardDAV, so it served as a complete substitute to Google Mail+Contacts+Calendar.
rekabis
Is it known to be compatible with OpenBSD as-is, or with minimal tweaking?
megous
OpenDKIM works fine, and is easy to configure. My first time config was like 30 mins following the guide here: https://wiki.debian.org/opendkim
And postfix is exceptionally well documented software. One of the best. It's easy to script config modifications thanks to `postconf` and do all kinds of interesting stuff with milters or policy servers, etc.
Avamander
OpenDKIM is unmaintained and does not support Ed25519 signatures.
megous
It does in my Linux distro for the last 4.5 years.
https://github.com/trusteddomainproject/OpenDKIM/commits/7c7...
tecleandor
Auch. Now that you say... last commit in 2018 and last release in 2014. And a couple beta releases in 2018.
throw0101d
> Wow... having just gone through a 20+ hour byzantine nightmare of setting up postfix & dovecot
Did you do this by hand / manually, or use a 'pre-canned' solution like:
kbmn
Comparison between Mailcow and Mox:
Mailcow (from https://docs.mailcow.email/getstarted/prerequisite-system/#m...):
A single SOGo worker can acquire ~350 MiB RAM before it gets purged. The more ActiveSync connections you plan to use, the more RAM you will need. A default configuration spawns 20 workers.
*RAM usage examples*
A company with 15 phones (EAS enabled) and about 50 concurrent IMAP connections should plan 16 GiB RAM.
6 GiB RAM + 1 GiB swap are fine for most private installations while 8 GiB RAM are recommended for ~5 to 10 users.
Mox:I checked with htop, and my Mox process currently takes <100 MB.
QuadrupleA
Manually - I want as slim/minimal/resource-efficient a setup as I can, and to understand what I'm configuring.
throw0101d
https://workaround.org has pretty good instructions for each component that allows one to understand things: very little magic involved.
KronisLV
I just gave up and now use https://github.com/docker-mailserver/docker-mailserver
It hasn’t given me many issues so far! Nice to see new options popping up, though!
jcarrano
I once set up qmail on a home server. Looking back, I have no idea how I managed.
coob
It is a rite of passage. That config system…
throw16180339
It's a lot better than sendmail.cf, which I had to use in a previous job.
# handle "from:<>" special case
R$*<>$* $@@ turn into magic token
# basic textual canonicalization
R<$*<@$+>> $@$1<@$2>
R$*<$+>$* $2 basic RFC822 parsing
# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
R@$+,$+:$+ @$1:$2:$3 change all "," to ":"
R@$+:$+ $@$>6<@$1>:$2 src route canonical
R$+:$*;@$+ $@$1:$2;@$3 list syntax
R$+@$+ $:$1<@$2> focus on domain
R$+<$+@$+> $1$2<@$3> move gaze right
R$+<@$+> $@$>6$1<@$2> already canonical
sgt
I ended up changing to mailu recently, very happy with it. https://mailu.io
sgt
Btw, I ended up disabling webmail. I don't the users really need it. Nothing will compare to the Gmail experience anyway, so might as well just encourage people to use proper Mail clients like Mail.app or Mail on iOS.
rytis
> Nothing will compare to the Gmail experience
I think this might be a matter of personal preferences. Personally I find GMail very confusing, and not that user friendly.
FastMail UI is so much more intuitive. For me.
aryonoco
I used to think Gmail’s interface was excellent until I moved to Fastmail.
BLKNSLVR
Seconding for mailu. I've had a mailu server running for at least a couple of years that requires very little on-going maintenance, but I don't use it daily or for anything personally mission critical.
When I do need it, however, it's there, humming away happily.
kbmn
I've hosted my mailserver myself for years now. I recently (a number of months ago) have started using Mox for my mail server (after using stalwart, manual postfix/dovecot, a couple others). It's a perfect solution for a small personal mailserver.
It's among the simplest (/least complicated) mail servers I've used, and I have to waste basically zero time on it. Running backup & update every couple months takes <5 min.
However, I noticed: when I showcase it to some people, some of them mistake the very simple minimalist web interface for being ‘outdated’ or similar - it appears that to be "modern", things are required to be extremely bloated, and even technical people look down on fast (seriously: try it) clutter-less design.
volemo
I’m honestly curious, what’s the point of a personal mail server nowadays? Isn’t it the case that today they have two huge disadvantages:
1. Being plagued by spam,
2. Being considered spam by major mail services (where most of one’s recipients will usually reside)?
Do you face these problems? How do you manage? Are there any potential problems I don’t see?
account42
> 1. Being plagued by spam,
An overstated problem IMO. Even just Thunderbird's client-side filtering works well enough to mostly ignore it and just occasionally go sweep through the spam folder to see if anything was caught inadvertantly. If you run your own server you can also setup whatever spam filter you want but personally I care more about real people being able to contact me than I care about never seing any spam (subjects only, pretty easy to tell what is worth openingn from subject + sender).
> 2. Being considered spam by major mail services (where most of one’s recipients will usually reside)?
Which may or may not be a problem for a personal mail server. Personally I have never had any problem with Gmail (YMMV) which at this point covers pretty much everyone I know who doesn't run their own server. Microsoft doesn't like my server due to others on the same block but so far I have decided that's not my problem.
q0uaur
personally - gmail is extremely plagued by spam. sure it goes into the spam mailbox most of the time, but enough non-spam email goes there too so you still have to check it. the current plague for me is "your package is awaiting delivery" spam - almost daily.
for being considered spam - i've had like 3 irl things set up on my old self-hosted mail, and these 3 arrived, even though while testing shortly after making the setup i did end up in spam. i don't know if companies have a whitelist of "if a user has this email on his account, don't send to spam" or something, but it hasnt been an issue.
i don't usually email too many individuals, in my social circles emails is not for that and has pretty much died long ago.
Due to the decent success i've had, i've spent some time today setting up mox to potentially replace my other solution - it is a bit of a process, many dns entries to make, and DNSSEC in my country seems to only update once a day so i'll see if i can enable it tomorrow, but so far it's working (but as usual, the first test email lands in spam.) i assume delivery will improve as soon as the domain is a bit older - i imagine most big mail services block email from a domain created the same day the mail is sent.
account42
Besides actual spam spam, Gmail also gets more random similar-named people giving your address to service providers if you have something like initial + lastname or similar. There are too many "legit" companies that don't implement e-mail verification and just repeatedly send to whatever was provided.
la_mezcla
1) No. 1 spam email once per... 2-3 weeks. And Mox, which I run, comes without any spam filter.
2) Perhaps sometimes. The Mail-tester shows, nonetheless, a rate close to 10.
6-7 years or running my own email
And now compare this to one downside of the likes of gmail: one day you may get locked out of your email.
kbmn
> I’m honestly curious, what’s the point of a personal mail server nowadays?
There's a large number of cool things possible, my favorite is having a catch-all domain (or multiple). Most of the time when you buy mail hosting from your domain registrar for example, you pay by mailbox. Same goes for the majority of mail hosters in general.With a catch-all domain, you can email <anything>@example.org, and I will get it. I don't have to first generate some addy.io or simplelogin.io or Firefox Relay alias; I can simply enter <company name>@example.org or <service>@example.org when registering on a website, hell I do that even on physical (paper) forms.
Later on, I can decide to add an alias with special configuration, e.g.: email arrives at <tax department>@example.org? → Route to "High importance" mailbox; I receive a Newsletter from a company I never heard of → <company name>@example.org sold my email address (and they can't strip the marker off, which they easily could with the +suffix).
> Isn’t it the case that today they have two huge disadvantages:
> 1. Being plagued by spam,
I do not remember having received a single spam email in the last months. In fact, I just looked up the stats: My personal (non-business, non-work) inbox in Thunderbird reaches back to about 2024-03-14, with about 2500 elements.My spam folder currently contains 0 elements.
And I don't even have any advanced spam filtering or reputation blacklists or anything similar setup.
> 2. Being considered spam by major mail services (where most of one’s recipients will usually reside)?
I actually tried this out some months ago with an "email placement tester": I can comfortably reach Gmail & Google Workspace, Hotmail/Office 365/Exchange, and a few others that were tested that I forgot about.I do not remember mails of mine not reaching their intended receiver very often - while this might happen once a year (that you send an email and one second after get a "your message could not be delivered" response), I actually hear about this more often from peers using the largest email provider in the DACH region (GMX), so apparently I rank better? It's usually a misconfiguration from the receiver setting up some scam DNS blocklist (e.g. UCEPROTECT). Wouldn't call this a problem of the mail server though, and as I said, even some rather large (commercial) providers have the same issue.
Generally speaking, if you do things right, email will go well for you - this "doing things right" has simply for a long time been quite hard (when postfix/dovecot was prevalent where you need n-number of different third-party software packages, e.g. OpenDMARC). Nowadays, with the modern mail servers available, like Mox (or Stalwart, or Maddy) doing "things right" is very simple: Choose an hoster/ISP with good IP reputation (e.g. check with https://multirbl.valli.org/ if they are on any blocklists), setup your (modern) mailserver, and you're golden.
And this will come with a nice number of advantages:
- you have your own domain, so you're portable
- you control and are able to customize your email infrastructure (how many mailboxes do I want for my use cases, how would I like different aliases to be mapped to them, catch-all/wildcard, applying scripts on these mailboxes, etc)
- privacy/security: Your email (which I consider deeply core to the modern internet infrastructure and ones digital identity (due to controlling the login to basically all websites)) lives on your infrastructure, and no-one but you can access them
- selfhosting is fun, and one gains lots of knowledge about inner workings of the internet with it
jeremyjh
Catch-all domains are supported by GMail[1], and some registrars (example, namecheap [2]) will also forward all emails. Namecheap gives you 100 pre-defined mailboxes that can forward to different outgoing boxes, in addition to a catch-all.
[1] https://support.google.com/a/answer/12943537?hl=en
[2] https://www.namecheap.com/support/knowledgebase/article.aspx...
account42
> I receive a Newsletter from a company I never heard of → <company name>@example.org sold my email address (and they can't strip the marker off, which they easily could with the +suffix).
This isn't reliable as true catch-all adresses (i.e. any local part works) are easily detected at which point spammers can just use whatever. I also don't find this too useful because usually you either can't afford to stop doing business with the company (in which case you get to be angry but can't take any real action) or you could have just used a temporary address in the first place.
awestroke
> However, I noticed: when I showcase it to some people, some of them mistake the very simple minimalist web interface for being ‘outdated’ or similar - it appears that to be "modern", things are required to be extremely bloated, and even technical people look down on fast (seriously: try it) clutter-less design.
The design is ugly. It could easily be made much more beautiful while adding zero clutter.
kbmn
Are you referring to the projects website or the webinterface (https://www.xmox.nl/screenshots/#hdr-admin-web-interface)?
Looking at this picture for example https://www.xmox.nl/files/admin-domain.png I could call the design many adjectives, but 'ugly' would not be among them.
awestroke
The admin interface is pretty, the webmail interface is ugly
forsakenharmony
What made you switch away from stalwart? Was considering giving it a shot
jwr
So happy to see that. Hopefully more people will run their own E-mail instead of being slaves to the large adtech "free" e-mail providers. We need more balance on the Internet.
kazinator
You can't run your own e-mail, or not entirely. It's practically impossible to send SMTP from your own IP address. For sending SMTP, you need to go through a smarthost that has reputation.
If your ISP provides you with an e-mail setup that you can use with a conventional mail client where you enter IMAP4 and SMTP credentials, chances are you can use that for SMTP sending. I.e. from the perspective of sending mail, your ISP can't tell that you're a server; it thinks it's just Outlook or Thunderbird connecting to it.
Receiving mail is no problem; your ISP just must not be blocking port 25.
It's handy to give yourself mobile access. When I send mail from my phone, it connects to port 537 of my own mail server which provides authenticated SMTP over TLS. It forwards to the aforementioned ISP. (I can't connect directly to my home ISP's SMTP server from my phone because the phone is on a mobile network unrelated to that ISP; the ISP's SMTP forwarding servers are firewalled so only the subscriber addresses can talk to them.)
mmooss
Mox's FAQ addresses this question:
https://www.xmox.nl/faq/#hdr-won-t-the-big-email-providers-b...
Won't the big email providers block my email?
It is a common misconception that it is impossible to run your own email server nowadays. The claim is that the handful big email providers will simply block your email. However, you can run your own email server just fine, and your email will be accepted, provided you are doing it right.
If your email is rejected, it is often because your IP address has a bad email sending reputation. Email servers often use IP blocklists to reject email networks with a bad email sending reputation. These blocklists often work at the level of whole network ranges. So if you try to run an email server from a hosting provider with a bad reputation (which happens if they don't monitor their network or don't act on abuse/spam reports), your IP too will have a bad reputation and other mail servers (both large and small) may reject messages coming from you. During the quickstart, mox checks if your IPs are on a few often-used blocklists. It's typically not a good idea to host an email server on the cheapest or largest cloud providers: They often don't spend the resources necessary for a good reputation, or they simply block all outgoing SMTP traffic. It's better to look for a technically-focused local provider. They too may initially block outgoing SMTP connections on new machines to prevent spam from their networks. But they will either automatically open up outgoing SMTP traffic after a cool down period (e.g. 24 hours), or after you've contacted their support.
After you get past the IP blocklist checks, email servers use many more signals to determine if your email message could be spam and should be rejected. Mox helps you set up a system that doesn't trigger most of the technical signals (e.g. with SPF/DKIM/DMARC). But there are more signals, for example: Sending to a mail server or address for the first time. Sending from a newly registered domain (especially if you're sending automated messages, and if you send more messages after previous messages were rejected), domains that existed for a few weeks to a month are treated more friendly. Sending messages with content that resembles known spam messages.
Should your email be rejected, you will typically get an error message during the SMTP transaction that explains why. In the case of big email providers the error message often has instructions on how to prove to them you are a legitimate sender.
kazinator
That FAQ doesn't address anything. Suppose you're in a blacklisted block. Now what? Most residential IPs are blacklisted.
When I say I'm self-hosting, I mean I have a machine under a table right here in my home: True Scotsman's cotsman's self-hosting.
razemio
This FAQ is in complete disregard of reality. Almost all IP ranges of server providers are blocked. Getting a clean IP is close to impossible.
Big providers often only support their own forms and ignore open sources trust providers.
Small providers often do not maintain their email services which will simply auto spam your mail/domain, when it does not come from the big 10 providers.
null
toomim
Sure, it's not technically "impossible", but like...
> It is a common misconception that it is impossible to run your own email server
... the FAQ then goes on to give all the reasons that argue it's really really hard and probably not worth it for most people.
Avamander
Using an ISP's SMTP is an incredibly obsolete and problematic concept. Poorly authenticated with even worse deliverability. It was a bad idea even 10 years ago and it's just horrid right now.
Use your email provider's SMTP, even if it's you yourself.
durakot
This just isn't true, of course you can, you just need to use a hosting provider or ISP that allows it. Plenty do.
kazinator
It's not whether the hosting provider or ISP allows it, it's whether the address they give you has reputation so that mail servers all over the world allow connections from it.
khimaros
hetzner allows outbound smtp by request. the process is relatively painless and quick.
jks
Yes, but the process of getting Gmail, Outlook etc to receive your emails and put them in recipients' inboxes is far from painless or quick. An IP address with a clean history and SPF/DKIM/DMARC are table stakes, but then you get to play the "my emails are randomly dropped today while everything looked fine yesterday" game.
devmor
I am sending and receiving emails on a small rack server in a datacenter for 40+ domains, and have had no real issues with deliverability. YMMV but I believe the reputation problem is heavily skewed against cloud providers such as VPS hosts more than anything.
AnonHP
I’m curious to know how you could know if any emails you send are getting silently dropped. Do you check with the recipient again and/or through other modes of communication?
kazinator
What you have is really great. Hoeever, if I had a small rack server in a data center, I wouldn't be able to call it self-hosted with a straight face, unless I had an uncle who owns a 60% share of the data center or something.
sgt
Been running my own mail server since 1999 or so. No issues.
zimpenfish
> Been running my own mail server since 1999 or so.
Same.
> No issues.
Many issues.
ggm
You're grandfathered in. Fresh starts face an uphill battle with taint and reputation.
dingaling
> It's practically impossible to > send SMTP from your own IP address.
I haven't had any problem in that regard in over 20 years of running a mail server on an old PC, on residential ISP connections. SPF, DKIM and rDNS config seemed to keep all the big players happy.
Which just made me realise I don't even have valid rDNS anymore, but it still works.
razemio
I tried for several years. There where to many issues. Even a perfectly configured mail server landed in spam folders of smaller providers. Had to constantly whitelist my server manually with the big providers. For 1-8 dollars a month, it was simply not worth it for me. Switch to encrypted mails where privacy matters. It is not like my emails land on private servers anyway, so the privacy aspect is more of a symbolic gesture than a real thing.
fareesh
- Where does one get an affordable server that isn't on a blacklist somewhere?
- What happens when one of the big cloud providers arbitrarily start putting your emails in spam?
Are there solutions to this? It feels like the biggest value provided by "big email" are these two things
dwedge
Those are the two problems caused by "big email". I've used hetzner, ovh and mythic beasts and had no issue with blacklisted IPs, and if you follow the Mox instructions you will be trusted and shouldn't get put in spam
q0uaur
since a lot of people are sharing anecdotes..
i spent some time today buying a new domain and setting up mox on a hetzner vm. the IP was on 3 blacklists on first check, after fixing the reverse dns it's on 2, one of which is apparently fake? dkim and dmark seem to be working, sending a mail to protonmail succeeds the checks, and yet it lands in spam - however, i'm confident once the domain is older than "just now" and i've set up DNSSEC (takes 1-3 days for this to start working in my country apparently) things will improve.
worst case i'll have to request a blocklist to unblock me, but i'll see.
jmb99
For your first point, the key is an IP range that isn’t on a blocklist. Pick a very reputable hosting provider (not AWS/GCP/Azure), who has strict no-spam rules, and check out some spam reports from their ranges. Hetzner I’ve heard is good, digitalocean as well, but your mileage may vary.
For your second point, you live with it. I haven’t found a solution, at least. I’ve never landed in spam for corporate offerings (cloud O365, google workspace or whatever they call it now) or (very rare these days) anyone self-hosting with rspamd or equivalent, just regular personal mail (hotmail, gmail, iCloud, etc). That’s usually pretty easy to detect and work around (“hey I sent you an email” “oh I didn’t get it” “did you check your junk?”) Irritating, but not the end of the world.
I’m going to try hosting from my residential IP sometime this year, now that I have sufficient redundancy in terms of power and networking. I don’t know if I’ll have better or worse luck than with hosting providers’ IP ranges, though.
grepfru_it
Bro, I owned a /23 at a colo for over 10 years. Registered my ip space with ARIN, had abuse contacts, setup a mail server on a /27 on a /24 that remained mostly unused outside of dev and test servers (strictly controlled). The mail server was also strictly configured to never emit a single email that wasn’t sent by me. So no forwards, no bounces etc.
Mail server still gets blocked by random domains. Nope. Done with hosting email. Everyone assumes you are spam and won’t accept your mail unless you pay them (to be your mail provider).
gostsamo
I self host on hetzner. ticket to support to open 25 and mailbox on a 5euro machine.
pjc50
If people just want to stick it to the Man by moving out of the cloud, then the solution might be "medium email": hosted by a commercial provider, so you don't have to do all the admin, but not self-hosted.
pmlnr
My ISP, Zen, in the UK, gives static IPs. That, combined with residential fiber and a thin client makes excellent mini server at home.
arp242
There are plenty of free non-adtech alternatives: Proton, Tuta, probably others. Even more options if you're willing to pay a few monetary units/month for it. You don't really need to run your own email server.
nmz
We won't have much choice, last year yahoo implemented a limit on COPY so you couldn't move or delete more than 10 mails at once. this broke claws-mail, I think its good now but I still moved on to another "free" service.
Mixing email with the drive service in the account is actively hostile.
durakot
It's cool to see some new modern all-in-one email solutions. Stalwart is another good one. Would be even cooler to see this lead to a bit of a resurgence of small and self-hosted email providers.
Avamander
Stalwart does seem much more modern and feature-complete however.
ehnto
I hope it does. We have to get through the challenging issue of convincing big tech companies that our small email servers are not spam however.
durakot
I've self-hosted email on and off since the mid 2000s and my impression is that with the widespread adoption of DKIM/DMARC, the large providers have toned down the spam-by-default treatment of small/unknown email servers. Even Microsoft a bit, though you still have to get your IP whitelisted to send to outlook.com addresses usually.
goku12
That's perhaps because you have been self-hosting that long. One of the advises given to new self-hosters these days is to start sending mail to your your friends' email accounts that are hosted by the bigtech. Then you have to contact each one and ask them to mark it as not-spam, so that some day your mails will go to their inboxes, rather than the spam folder.
Honestly, I don't think that DKIM/DMARC has made the situation any better. In fact, spamassassin and rspamd often seems to work better than their spam filters in identifying actual spam.
VladVladikoff
Microsoft is absolutely hell to deal with. Especially if you are hosted on Linode. They frequently ban entire linode subnets. I’ve had to resort to routing all send mail via Amazon AWS SES just because of Microsoft’s IP range bans. It’s not what I’m doing, but my neighbours.
petee
I haven't tried sending to Outlook, but so far I'm getting through Google with just a strict SPF and a DNSSEC domain. Very low volume, to the point I assume reputation isn't being tracked. Just an observation
ehnto
That's really great to hear, I haven't self hosted since maybe 2015. I must admit I assumed things would surely have gotten worse, not better.
jwr
This doesn't seem to be a problem anymore. What is a problem, though, is big tech companies spamming us incessantly and doing almost nothing to prevent that.
I get 10-20 spam E-mails a day from AWS, Google and Microsoft. Forwarding spam to their abuse@ contacts doesn't seem to do anything. And I can't block them, like I would a smaller spammer.
VladVladikoff
Haha the best part is when the same Gmail or outlook address spams you again two weeks after reporting that very same address to abuse@gmail/outlook.
null
dyzdyz010
Stalwart isn't really an all-in-one solution, it doesn't have webmail functionalities, just a backend.
throawayonthe
the FAQ claims it does have a web interface; is it not really functional, or something else? never used it myself
AAAAaccountAAAA
That's an admin interface, to configure the server. Webmail is something that one uses to read the mails.
leptons
Self-hosting email is a fool's errand. I used to do it. I'll never do it again. It requires way too much specific knowledge about how the entire email system works. You have to really want to learn everything about running an email server and everything about email to be successful, and even then your ISP could get in the way, as well as all kinds of spam blocker services that you have to deal with to get your special email server unblocked. It was a nightmare, and it's honestly worth paying a few bucks a month for someone else to deal with that. I have a ton of other way more important things to do with my time.
null
dwedge
Email hosting is absolutely the lowest maintenance of everything I host. For anyone else reading this, if you follow 'mox quickstart' it will help you set up your DNS correctly so you don't have the above experience.
leptons
Congratulations for not hosting anything interesting, I guess? My self-hosted VPN is the lowest maintenance thing ever - it just runs, and I never have to touch it. I host quite a bit of stuff, but email was daunting. Every week it was some new fresh hell. Spam blocking lists were the worst of it, and no I wasn't spamming anyone.
VladVladikoff
I have some questions for the creator of this software if they happen to be paying attention to this thread. I have been running a small scale email server for about 10 different related business domains. Currently we use iRedMail. 1) Does the webmail client support 2FA? 2) Is it possible to do 2FA in thunderbird? 3) Can I make custom rules for BEC attacks (ideally I want to define “FirstName LastName” => email@domain.com whitelists using regex patterns. We get a LOT of very targeted BEC attacks and we have found this is the best way to handle it. We have it very locked down now. Yes we also do employee education on what to look for but this also helps. 4) does the webmail client do banners like “this sender is outside of your org” or “you have never received an email from this sender beige” etc.
Thanks!
mjl-
1. no 2fa in the webmail yet. work is currently underway at the ietf for standardizing chained SASL (auth) mechanisms, and passkeys. i want to look at implementing passkeys already for the web interfaces, but there is much more on the todo-list... 2. i as shown by yamrzou, i don't think so. SASL auth really just uses 1 auth mechanism at the moment. i think there is also standardiziation work underway for password+totp sasl authentication. but clients (like thunderbird) would still have to implement it before it's useful. there may be a trick to get 2fa-like authentication now, using both TLS client cert authentication (mox supports this based on public key identification, no other properties of certs) and a IMAP/SMTP-level SASL authentication. 3. no, but this is interesting. what kind of rules would you set? rules to match specific message headers/content that identify a message a phishing and reject it? for when attackers send the same message to many employees? do you need to remove messages from their inboxes after it has been delivered (assuming all employees would get the email at around the same time)? 4. no, but i've considered adding it. it should be very simple to add. and it's much better than mail servers modifying the message content to add messages like that.
VladVladikoff
It's good to hear you are working on 2FA that is certainly one of the biggest requests we receive lately for our self hosted email, and has almost pushed me to switch to cloud based services.
With regards to thunderbird and 2FA, it appears that there are some third party solutions, i don't quite understand how they work, looks like they are using SAML or something. https://www.miniorange.com/thunderbird-2fa-mfa-two-factor-au...
To give you an example for the BEC filters we are using, we use the postfix header checks with a negative lookhead regex. For example:
# /etc/postfix/header_checks
# block impersonations
/^From:\s"?Firstname.*(Lastname)?"?.*?<(?!(.*@domain1\.com|.*@domain2\.com|.*@domain3\.com|personal\.email\.account@gmail\.com)>).*$/ REJECT Sorry the server is busy right now.
I would say that this approach is certainly not ideal, it's hacky and manually maintained. I personally believe that a smart mail server should be aware of what it's users use for firstname-lastname-email.address@domain.tld combinations and it should either block or soft block (show warning badges in the webmail client) mail which does not follow the pattern of the defined users.We also use the mime header checks to block some bad attachment types (this is kind of oldschool there are certainly more modern approaches)
# /etc/postfix/mime_header_checks
# block bad attachments
/^\s*Content-(Disposition|Type).*name\s*=\s*"?([^;]*\.(ade|adp|bas|bat|chm|cmd|com|cpl|crt|dll|exe|hlp|hta|htm|html|inf|ins|isp|js|jse|lnk|mdb|mde|mdt|mdw|msc|msi|msp|mst|nws|ops|pcd|pif|prf|reg|scf|scr\??|sct|shb|shs|sh|shm|swf|vb[esx]?|vxd|wsc|wsf|wsh)\b)(\?=)?"?\s*(;|$)/x REJECT Attachment name "$2" may not end with ".$3"
Re #4 yes, I agree, modifying the actual the mail breaks DKIM, you can really only do this in webmail.yamrzou
Apparently, it doesn't support 2FA (yet). From https://discuss.privacyguides.net/t/mox-modern-full-featured...:
> Another is 2FA. It would be relatively easy to implement in the web interfaces, but not with SMTP (submission) and IMAP. Most clients can at most do cram-md5 for authentication mechanism (old). I don’t know any clients doing the safer scram-sha-256-plus properly (with mutual verification and TLS channel binding, mox implements it). Interested in hearing what the thoughts are on these topics.
npodbielski
You can have 2Fa in mailcow, for admin UI and sogo.
chmike
How does mox compare to maddy, another Go all in one mail server ? Does mox support antivirus addition ? Didn't see that in the docs but I may have skipped that section.
mjl-
> Does mox support antivirus addition
No, not currently possible. I think it needs milter-like functionality in the smtp server. Would be good to have eventually.
q0uaur
set this up today, the documentation is useful and the quickstart very helpful, the dns stuff pretty much works exactly as it's supposed to and is just a bunch of copypasting (in my registrar's ui).
specifically for mox there was some things i would have liked to see: explain how the webmail isn't accessible on the public ip by default - i don't know how many of you want to be in a specific vpn for checking your email, but i sure was surprised i couldn't reach it, but had to activate it in config (and first figure out how to even do that). mox also doesn't redirect to https by default - imo it should, since it already includes the convenient automated certificate setup (which worked great).
maybe it is intended for a different environment, but since it recommends not running another webserver on the same host, i really don't want to access the webmail from the local server or by http. i like most of my services being available behind a reverse proxy, there it would make more sense. maybe i'll look into that variant later, but the documentation isn't quite as complete as i'd like.
-warren
After 21 years of hosting my own email server, starting with roll-your-own (anyone else remember sendmail.cf?) and moving to boxed solutions such as mox or mailcow, I gave up. Maintaining IP reputation and keeping up with the neverending set of arbitrary rules (spf, dkim, etc) I found my time was worth something too. Doing an honest ROI calculation, I figured i was spending 2 hours on average each month keeping the plumbing going. For me, that was well-worth the ~15/month that proton charges. I bet there are other good ones out there too!
To be honest though, throughout those decades, I learned a vast amount about how email flows. That knowledge is irreplaceable.
My recommendation is to try your own until you really, REALLY understand it. Then move to a paid solution.
ptman
Has someone compared this to other modern alternatives? Stalwart (open core), chasquid, maddy, ...?
brokegrammer
Stalwart seems to be Rusty, while this one is Gooey.
donio
Haven't used Mox yet but Chasquid is great if you want something that's focused on being a streamlined modern MTA rather than "all-in-one". So kind of the opposite of the Mox approach.
I like Chasquid for its straightforward codebase and the hook system that you can use to customize it further.
ValdikSS
I've compared iRedMail, Mail-in-a-box, Mailcow, Modoboa, in 2021, if that helps (its in Russian)
https://www.linux.org.ru/forum/general/16654099?cid=16658164
ptman
I'm not really interested in these setups that combine postfix, dovecot, opendkim etc. Those aren't what I consider modern all-in-one email servers.
phoronixrly
Stalwart seems to be more ahead feature-wise. As a Stalwart user I will definitely keep an eye on this project. Just a couple of missing features that are a dealbreaker. One of them is also absent in Stalwart - aliases to external accounts.
averageRoyalty
A somewhat related tangent, has anyone got good desktop email client recommendations? Preferably macOS/Linux.
I have 6ish email accounts I need to monitor, and outside of Outlook (and the various hellish variations of it), I'm yet to find a good client like all smartphones seem to have - all inboxes in one client presented together. I recall having a number of issues with Thunderbird a few years ago when I last tried it, but I don't remember why.
KAKAN
I use a mix of Evolution[0] (GNOME's Thunderbird) and Geary[1]. Geary has a very nice UI, and can become mobile-like, and Evolution has much more support for automations and other niceities.
There's also alps[2], if you want a web based solution. I love it as well, though Geary is my most used solution.
[0]: https://gitlab.gnome.org/GNOME/evolution/-/wikis/home
amiga386
I'm not sure what your issues were, but Thunderbird is still the king of desktop email clients. It supports a unified inbox, go to the inbox and tick View -> Folders -> Unified
linsomniac
With that top screen shot, I'm surprised that it does't have UUCP support.
mrweasel
I think it looks amazing. No non-sense, clear labeling on buttons and nice colours.
linsomniac
The first screen shot is an e-mail from Ian Lance Taylor, the author of, arguably, the best UUCP implementation, and how I sent/received most of my e-mail up until 2010. It was really, really good at dealing with spotty wireless connections like CDPD and spotty early cellular hotspots. All my company's e-mail would come into an SMTP server, and then the last mile was UUCP to our individual laptops.
Story time: Back in maybe '93, I had a UUCP connection to a provider in Colorado. I was calling in from Nebraska (I had moved out there temporarily, but it had always been a long distance call). One day the e-mail stopped flowing. After a bunch of debugging I found that it would connect, and then sit there waiting for data packets from the remote end. I got ahold of the provider and the issue was they were using the SunOS UUCP, which stored all the files for all feeds in a single directory, and some of their users didn't call in regularly, some I get the impression were getting e-mail and not calling in anymore. Eventually this directory filled up to the point where the OS couldn't scan it within the UUCP timeout.
They ended up throwing hardware at the problem, but I suggested that they switch to taylor-uucp. Taylor stored the queues in a per-endpoint set of directories, so you didn't run into the large directory problem unless your UUCP endpoint was the offending one. However the provider replied that "tayloruucp doesn't work well with larger providers." So I asked Ian Lance Taylor about that, and he replied "That's news to [one of the largest national, probably international UUCP providers]".
qwertox
From the FAQ
How do I configure a second mox instance as a backup MX?
Unfortunately, mox does not yet provide an option for that. Mox does spam filtering based on reputation of received messages. It will take a good amount of work to share that information with a backup MX. Without that information, spammers could use a backup MX to get their spam accepted.
muppetman
These days a backup MX seems pretty pointless, no? If your mailserver is down, almost every mail platform out there with a message for you will store and retry later.
mmooss
In certain contexts, waiting for redelivery is unacceptable performance. Some people lose lots of money if they aren't in the loop. Imagine a group email chain, the CEO is asking questions, everyone is responding immediately - except you.
dwedge
I agree with your point, but I don't accept the premise that people are responding quickly to emails. 99% of emails are transactional these days, and places where they aren't (eg. internal at BigCorp) it's not unusual for people to be receiving 1000s a day.
Replying the same day is considered quick for places with C level.
Terretta
Or magic link logins...
stonogo
backup MX systems are useful, but the above faq is ... naive. it's fairly simple to deploy a backup mx that does not accept mail unless the higher-priority mxes fail a health check.
mjl-
Seems reasonable. I have been thinking about schemes for backup mx'es. When the primary is online, the backup would just forward the smtp connections to the primary directly. The backup mx only has to do their own work when the primary is down. I was/am concerned about the backup mx accepting spam that you don't really want to bounce later on. But that should be an exception.
I am also thinking about synchronizing all the data to another machine. It would allow a manual failover procedure. And it's nice to have another machine (IP) for outgoing email in case the primary IP gets on a block list. But this is all future work.
dwedge
I'd love a backup MX that acts clustered. Email is file/object based, I should be able to spin up 5 VPS and send/receive from any one of them without ending up with an out of sync email. The closest I've found so far is aerogramme that stores in their own object store implementation but it's very much alpha https://github.com/deuxfleurs-org/aerogramme
qwertox
I believe the main issue is keeping them in sync.
Wow... having just gone through a 20+ hour byzantine nightmare of setting up postfix & dovecot (that's on top of an already deep understanding of SMTP, DKIM, SPF, DMARC, SASL, etc.) and now struggling through an even more kafkaesque nightmare of rspamd (with its 3 different programming languages needed to understand its 92+ configuration files, which you can't modify by the way, you have to add your own "override" and "merge" config files on top of that mess) for the simple purpose of getting it to DKIM-sign my stupid outgoing messages the way all the big mail systems want... I wish I had seen mox earlier!
Not sure its quality, but battling with postfix & dovecot's 20+ years of legacy cruft, I felt compelled many times to just throw them aside and build something like this on first principles - simple single binary mail server with modern protocol support, sans all the archaic UNIX-account timesharing-era sendmail bullshit that still lives on in the mainstays.
Going to have a look at this one, despite now having moderately deep postfix & dovecot knowledge.