Stalwart All-in-One Mail Server (IMAP, JMAP, SMTP)
github.com
github.com
But in the meantime email still fills an important role, and perhaps enough layers of options will get us close. After the Gandi.net sellout most recently this feels like propitious timing to me, I really dislike the typical email service pricing models. Paying just for the domains and relay, both of which are trivial to swap around at will, and then otherwise having that on my own infrastructure certainly feels attractive to try firing up again at least for a handful of domains.
1. Self-host on a reputable VPS provider. Deliverability is usually not a problem if your provider actually takes action against spammers on their network. They tend to work pretty hard to keep up the reputation of their IP space. I have self-hosted my own email for well over a decade on providers like these with no serious issues. It's not generally too hard to test the reputation of an IP/domain before putting it into production.
2. You can use a dedicated SMTP relay service, but these are usually quite expensive and their customers tend to be bulk email senders for blasting out marketing wank. You probably don't want your domain to be associated with these anyway.
3. Another option is to buy a full-fledged email account from any of the common providers and just use their SMTP servers. (Make sure to set your SPF records appropriately.) Not expensive but typically far from free. And it seems silly to self-host your mail if you're literally paying a company to provide the same service...
4. This is less "self-hosted" but the cheapest and most reliable way to get your email out is to sign up for a cloud account at any of the major providers and just use their SMTP relays. Most will allow you to send from outside their network, after proper authentication is set up. Unless your monthly email volume is north of 4 figures, it will likely be free or cost pennies per month.
Don't forget that amongst email providers reputation is a thing, and if you go out and purchase a domain, it may be some time before you can actually use it. Lots of providers specifically penalize domains younger than X months old, they will "graylist" IPs that haven't talked to them before, and a few will flat-out blacklist entire gTLDs known to be heavily used by spammers.
This explains poor delivery for emails from a .xyz domain I have, even hosted with an e-mail provider.
The only similar problem I've experienced is sometimes companies will get uppity if you put their company name in the email address you give them. But it's easy enough to just make up a difference nonce for those cases (or start your scheme based on opaque nonces for everyone). I'm still waiting for the other shoe to drop and surveillance companies to start discriminating against non-surveillance-company email addresses the way they do against VOIP phone numbers.
I don't typically give endorsements, but I've been using DuoCircle.com since back when they were part of "dyn.com" and I've been very pleased. Apparently they have a free tier, but their current pricing is very reasonable to my eye. (I'm on an old annual plan that doesn't appear to be offered anymore...)
https://www.duocircle.com/email/outbound-smtp
Deliverability through them has been very good over the years.
I also have my outbound SMTP server set to send via AWS if my email includes a particular custom header (which it also then strips out before forwarding on) - which means for domains I think might have deliverability issues I can deal with this without needing to make a huge effort.
On pricing/ROI: most of the paid tiers for monthly plans seem to start $15-20/month now though with free tiers to experiment with first. I think self-hosting tends to pay for itself best if you fall into certain now neglected niches and have existing infra, or else are willing to pay some premium ideologically. Most email services now tend to squish a bunch of the actual underlying stuff into a specific payment model: mailbox (email address) is 1:1 with a person, and also covers storage, while people don't really think about sending numbers. Whereas underlying storage is actually dirt cheap particularly in the context of email, mailboxes are effectively free, but sending emails costs. So for example I have a bunch of domains and lots of email accounts at them, I was always in the habit of making heavy use of separate mailboxes for basic utility usage like a server sending a status alert (and that also means the server email address can be restricted and not have credentials fro my personal or work email etc). Low volume, tons of mailboxes, occasional big messages with logs and such is an absolutely awful fit for most mail services and getting worse. I also have reasonably solid self-hosting infrastructure already that I've amortized for other things, so at this point essentially adding another VM is quite efficient. For someone who falls into the general bucket, just going somewhwre like Fastmail or even GSuite or the like would almost certainly make more sense. $15/month would buy 3 of Fastmail's standard "users" (ie, mailboxes/different addresses). But I have way more than that, lots of which only send a handful of emails. Doing that with Fastmail/ProtonMail/Gmail/etc type pricing would be hundreds of dollars including $5/month accounts that receive nothing and might not send more than a handful of emails per year.
Anyway, that's my thinking and what I've been experimenting with so far. But ultimately part of the point/value of it all is that on the "difficulty of change" scale, moving to a new email address entirely is the worst though cheapest, owning your own domain and being able to point at a new email provider then is vastly easier but costs domain/year (this mid level is probably best for most people), and having merely to change relays on a server costs the most but is the most transparent. So trying to get out of the habit of thinking of these things as needing to be long term relationships. If a relay service isn't working for me with self-host or someone offers better I'll just move. I'll probably keep one or two addresses traditional too as fallbacks.
----
panix.com hosts my start of authority for DNS and they probably have a product that might fit your needs.
Has the definition of self-hosting email evolved to include using a third-party SMTP relay service?
(It's always been a slightly fuzzy definition, and maybe the last time it shifted was when it included running on cloud servers/VPS rather computer hardware that you own.)
I’ve always seen it as a good way to let people new to a topic see the full discussion that’s already occurred. You get more insight
Maddy mentions actual security features (DMARC, MTA-STS, DANE, DNSSEC, DKIM) in its overview and compatibility with rspamd etc. (which is rather vital if you want to properly handle spam).
> Stalwart Labs Ltd. is a very small team consisting of just one developer, who has been implementing email software in C since the mid-90s.
https://devboard.gitsense.com/stalwartlabs?repos=imap-server...
https://devboard.gitsense.com/foxcpp?repos=go-jmap,maddy,mai...
Not sure if Stalwart recently got funding, but the number of participants shot up in the last week. Stalwart's popularity (stars/watch events) also shot up like crazy about 5 weeks ago.
Note, I'm not indexing the code history for both projects right now (they are queued but they probably won't be indexed for another hour or two) so the community insights is incomplete.
Full Disclosure: This is my tool
Though it's not that difficult to get a well-working rspamd setup.
Given it's all-in-one thing, MDA/LDA is integrated, to best of my (very shallow, just ~30 minutes haphazardly checking docs and source code) understanding there is no separate delivery agent program sitting in-between the components, it's all a single process, but it has places where you can hook arbitrary external filters/transformers (https://stalw.art/docs/smtp/inbound/data#content-filters)
One concern is that Email is designed to be highly modular in the UNIX sense. Does this eliminate some of this modularity? For, instance can I still use Dovecot for IMAP, POP3 if I want?
I’m just about to set up a couple of new domains, and was procrastinating because email. This looks perfect, something new to play with and get email set-up done at the same time :)
Or did you mean incoming?
- 24x7 running - spam - security
rather then proof-of-concept?
The really hard thing is to self host outbound email delivery. You almost have to use a relay service to get mail delivered these days. Most IPs at cheap hosting services are in a bad neighborhood and will be treated poorly by association. On the other hand, most transactional email services have a generous free tier that would work for a lot of self-hosted setups.
Relaying through MailChannels is free with no volume limits if you do it via Cloudflare Workers. Would be nice to see someone merge that with this project as an option.
i.e. mary@domaina.com and mary@domainb.com as different email accounts?