Modern email already depends on HTTP, with protocols like MTA-STS (https://www.rfc-editor.org/info/rfc8461/) using HTTPS/TLS to improve transit encryption, or Web Key Directory (https://datatracker.ietf.org/doc/draft-koch-openpgp-webkey-s...) which uses HTTP for public key distribution. Personally I think these incremental improvements of SMTP are more promising than replacements, but we deserve better email however we can build it.
As a first step I would focus on something like broad S/MIME support. Unfortunately I suspect that the biggest email providers are disincentivized from doing this as it would disrupt their business models.
I don't agree with "Domain control as a fallback", as the author said "a domain is not owned, it is rented" and I want to normalise the idea that if you lose your private key, you need to start again. I hate that we keep giving so much authority to domains, it's such a big weakness. The author even left the key rotation chain out of the initial implementation.
I still think root/signer keys or sigchains are decent options.
I like this.
Question: can this e-mail specification/implementation also replace direct-messaging protocols (like WhatsApp)?
You can stop there, I've heard enough. Not everything is hypertext.
Interesting take re putting a cost on spam. Perhaps another take would be functionally implementing introductions.
> First-contact consent: an unknown sender doesn't get into the mailbox; they land in a "requests" box with their first message visible (like Signal's message requests). You accept, and the thread opens forever. A stranger can knock on your door, which is the essential property of mail, but they can't fill up your living room.
Unfortunately, this will only move the problem, and only reduce it in the case when all outside communication is ignored.
>The goal is not to replace the current mail system, heaven forbid!, but to learn, have fun and discover current technologies to swap out every element: sending, receiving, gateway, keys, and so on.
It's all for fun.
Deltachat
If you have a website, please, don't subject your visitors to something like that.
Honestly, I'd want this as a default. I wonder if a mailserver can be configure like this. Doesn't sound too hard, does it?
Email clients already highlight/filter people in your contacts
And I do not want an infinite thread conversation. I want to be able to split off - and perhaps archive and export - different conversations by topic.
I recently had to some legal things, which included forwarding copies of a certain conversation to a lawyer. This turns out to be unreasonably difficult because email clients quote previous conversations. You want a clean thread of comment and reply about a specific topic. You don't get that.
You do get it on chat services, but there's no option there to create sub-conversations.
If I was redesigning email I would think long and hard about different use cases and workflows and start with an RFC. Protocols are far downstream of that.
1. "The recipient will not get this message until you authenticate yourself as a legitimate sender at this URL [...]" - resulted in people never getting mail from no-reply addresses they cared about (banks, e-com, etc.)
2. "This sender has sent you an email, with this subject and this first paragraph. Click here to whitelist, here to blacklist" - created a lot of churn on first setup that users didn't like as a UX
Baking it into the protocol - even now in SMTP and IMAP land - is doable, but would be resisted by email providers who, for example, make their money selling data to marketing agencies. Like, you know, Google, Microsoft, Yahoo...
I've seen other approaches proposed - even at IETF level - over the years, including digital postage stamps (sender pays to send email, your server gets paid, and may reject non-stamped/paying email), but it's the usual network effect: until it becomes widely supported it won't "stick". The stuff that has been adopted has basically been stuff that Google likes, period.
It's called threads - even Matrix has these
And poof, we've poorly remembered Web of Trust from 20 years ago!
Overall I do love the idea of HTMP and if we could get it to easily fall back to standard old bad email, I think it could start as a niche and then upgrade towards HTMP over time as more clients adopted support for it.
Greylisting is not perfect, not even close, but it allows servers to reject huge amounts of garbage mail while allowing new mail from unexpected parties without user intervention.
What parent wants is also possible and I remember people doing it as far back as the early 2000s. You would basically manually whitelist an email or have them bypass the list (once or always) with something like a key word or token sort of like a captcha which can be shared off band.
Take this thought experiment - how does nearly every other standard protocol (DNS, SMTP, etc.) except for HTTP survive at scale without server-side load balancing?
Thankfully we're heading in this direction due to happy eyeballs and related client-side retry mechanisms.
Other than that...
The most important thing is not the protocol, it's the gui.
At the moment email's gui is horrible on all platforms without exception.
If/when a decent gui appears, protocols will follow.
Also, JMAP did reading can probably be just WebDAV?
* DNS lookup for MX record
New version
* DNS lookup for A record
* HTTP request for .wellknown/htmp/known_hosts
Not sure why this is being considered as an improvement?
> each mailbox of a domain on a different provider
Why is this useful/necessary or even 'good'?
How can you say that when it's one of the benefits of email that it's an open protocol and there's thousands of different apps built on top of it. Terminal UIs, web interfaces, chat interfaces etc. - that should be one of the cases where there's a GUI for anyone.
This is obviously a matter of opinion. Of course there are endless different email GUIs, on all the platforms; if you don't like one, there are many alternatives.
I cannot imagine that a "decent GUI" by modern web-development standards could be anything I'd prefer to what already exists. Email works and generally doesn't let designer ego get in the way.
I might add that if you want to enforce SMTP TLS, you can do just that without mta-sts or DANE.
This results in the top and left-side bars staying decorative and unobtrusive, but the concurrent visitor counter thingy is floating well above the bottom-right of the page. But then, as I shrink in the page width, the left-side bar and the concurrent visitor counter swap sides, and also a bunch of the content from the top is added to a new bar at the bottom. Eventually, the horizontal space between the side components becomes irrelevant such that they function as an additional bottom bar. At which point, maybe 40% of the vertical space is used for navigation and other shiny toys. This is really annoying, and the overall experience is inconsistent across widths.
(Also, at all widths, the top-bar has a transparent background, so main page text interferes with top-bar text as it scrolls.)
All of this is done in CSS, so presumably it can be fixed that way too.
Let's design the successor to email on top of HTTP, fixing the design flaws SMTP has been dragging along for 40 years. Piece by piece. The goal is not to replace the current mail system, heaven forbid!, but to learn, have fun and discover current technologies to swap out every element: sending, receiving, gateway, keys, and so on. The system will never talk to Gmail or any classic email provider: it only talks to itself. The only thing we are going to keep is the shape of the addresses, user@domain. Everything else gets reinvented.
Since it is a mail system over HTTP, a good name for the protocol would be HMTP: Hypertext Mail Transfer Protocol (the S for Simple in SMTP gives up its seat to the H for HTTP).
Now it's time to prepare the tech stack: HTTP, TLS, WebFinger, ActivityPub, Webmention, Ed25519, HPKE, sigchains, etc.
This design doesn't invent a single technology: everything already exists.
| Problem | Existing technology | Who uses it today |
|---|---|---|
| Transport and status codes | HTTP | The whole web |
| Transport encryption | TLS + Let's Encrypt | The whole web |
| User discovery | WebFinger (RFC 7033) | Mastodon and the Fediverse |
| Message delivery | POST to an inbox | ActivityPub |
| Sender verification at the source | The Webmention and DKIM pattern | IndieWeb, all of email |
| Signatures | Ed25519 | SSH, Signal |
| Content encryption | HPKE (RFC 9180) | MLS, TLS ECH |
| Identity that survives key rotation | Sigchains | ATProto (Bluesky), Keybase |
| Reading and synchronization | JMAP (RFC 8620) | Fastmail |
| Push notifications | SSE / WebPush | Every browser |
| First-contact consent | Message requests | Signal, Instagram |
| Attachments by reference with hashes | Content addressing | Git, IPFS, Matrix |
Every piece we are going to use is standardized, deployed and battle-tested at scale by millions of people; the only new thing is the assembly.
Choosing HTTP is not just pragmatism. It solves, right out of the gate, several things any new protocol would have to build at some point:
202 Accepted (queued for delivery), 429 Too Many Requests + Retry-After (rate control), 404/410 (mailbox unknown/gone), 3xx (mailbox moved), 413 (too large). Even paid anti-spam has had a code reserved since 1997: 402 Payment Required.Let's move to the next level: how do we discover a user, verify their identity, deliver the message, sign it and encrypt it, all over HTTP?
Delegation is solved with a static document:
GET https://example.com/.well-known/hmtp/ana
{
"inbox": "https://mail.migadu.example/hmtp/inbox/ana",
"keys": { ... },
"devices": [ ... ]
}
The inbox can live on another host: that is the MX record, but without touching DNS. A static blog on GitHub Pages can delegate its mail to a provider by serving a JSON file. And it allows something MX never did: per-user delegation (each mailbox of a domain on a different provider). We wouldn't even need to invent the route: WebFinger (RFC 7033) does exactly this, and Mastodon has already proven it scales.
Identity cannot be a key (they get lost, they expire); it has to be something that keys back. A proposal with two anchors:
However, domain-anchored identity has its own Achilles heel: a domain is not owned, it is rented. If you stop paying, it expires and someone registers it, the new owner publishes their keys in your .well-known and from that moment on they receive your mail and sign as you. Nobody can tell the legitimate heir from the squatter. It's the problem ATProto tries to solve by separating identity from the domain with DIDs, at the price of another piece of infrastructure. We know it's a real problem with a known solution. Now let's move on.
Delivery is a POST to the recipient's inbox:
POST /hmtp/inbox/ana HTTP/1.1
Host: mail.migadu.example
Content-Type: application/hmtp+json
The key is not the request, it's who makes it. Your client doesn't deliver directly to the recipient, but to your own server (an authenticated POST to your outbox), and it is your server that queues, retries with exponential backoff and honors Retry-After. It's admitting that SMTP's MUA/MSA/MTA separation was right. One of email's quiet strokes of genius is that if the destination server is down, your server retries for days and you forget about it.
But let's add an improvement SMTP never had. Every message carries an ID that is the hash of its content, so retries are idempotent. The receiving server deduplicates by ID and the classic "duplicate email because the ACK failed" disappears by construction.
The full cycle of a delivery, with the destination node down on the first attempt:
sequenceDiagram autonumber participant Ana as Ana's client participant SA as Ana's server participant SB as Bob's server
Ana->>SA: POST /outbox (signed message)
SA-->>Ana: 202 queued
SA->>SB: GET /.well-known/hmtp/bob
SB-->>SA: Bob's inbox and keys
SA->>SB: POST /hmtp/inbox/bob (envelope + sealed body)
Note over SB: down: no response
Note over SA: queue: retries with exponential backoff
SA->>SB: POST /hmtp/inbox/bob (retry, same id)
SB->>SA: GET /.well-known/hmtp/ana
SA-->>SB: Ana's signing key
Note over SB: signature verified, deduplicated by id
SB-->>SA: 201 delivered
Notice that the diagram contains the entire protocol: the two GETs to .well-known are discovery and verification, the POST is the delivery, and the queue lives where it should, on the sender's server.
The message is a signed object, not loose text:
{
"id": "sha256:9f2c...",
"from": "ana@example.com",
"to": ["bruno@example.org"],
"date": "2026-07-26T10:00:00Z",
"in_reply_to": "sha256:11ab...",
"subject": "Re: that idea",
"body": { "type": "text/markdown", "content": "<encrypted>" },
"signature": "..."
}
This buys us a lot of things:
.well-known of the from domain and checks that the key signs. It's the same move as Webmention verification. The proof is fetched at the source.in_reply_to and references by content hash. Conversations reconstructed without heuristics.{hash, url, size} pointing to the sender's server; the receiver downloads it on demand and their server can mirror it. No more base64 bloating mailboxes.Like in any system, this is a complex problem that needs several layers of defense. With HMTP we could start with three:
ana@example.com requires serving the key document at example.com. Identity is anchored to a domain, and domains cost money. It's the sybil cost that self-signed identities don't have. However, a domain gives you infinite subdomains and mailboxes, so the cost slows down the mass creation of independent identities, not of addresses. We work at the root level.402. Configurable per mailbox; the cost of cold spamming stops being zero.Email standardized sending (SMTP) and reading (IMAP/POP) as separate worlds. We don't need to invent anything: reading, synchronizing and searching mailboxes over JSON/HTTP is already solved and standardized by the IETF. It's called JMAP. HMTP would define delivery; reading is JMAP with one new object type. Push to the client with SSE or WebPush. The full cycle (send, deliver, read, sync) stays on HTTP.
Every problem of email has a solution deployed and working: discovery in Mastodon, delivery in ActivityPub, verification in the IndieWeb, rotatable identity in Bluesky, reading in Fastmail, consent in Signal. An upgrade to email already exists, but nobody has assembled it.
We solve many problems with elegant, modern solutions:
.well-known. A property that can be verified doesn't need reputation.from domain, and the signature travels with the message even when forwarded..well-known, with per-user delegation and no DNS changes.402.in_reply_to points to the hash of the parent message; the conversation is a verifiable graph.Talk is cheap, so I implemented a working prototype in Python: github.com/tanrax/hmtp. All in a single file. The prototype covers the full transport: signed delivery, verification at the source, end-to-end encryption, first-contact consent, deduplication, threads, a queue with exponential backoff and key rotation in one command. It deliberately leaves out the pieces at the periphery: the chain of signed rotations (receivers fetch your key live on every delivery instead of pinning it, so the chain only starts paying off once nodes cache keys), the 402 postage, attachments by reference and JMAP reading. The README has the quickstart (your first message in two minutes, mailing yourself), a demo of two nodes exchanging encrypted mail on your machine, and the full production guide, from DNS to systemd. Remember it's a design experiment with unaudited cryptography; don't use it for secrets anyone depends on. Although it could be a lightweight communication system for whatever ecosystem comes to your mind.
I hope you enjoyed the ride. And if you ever send your first HMTP message, I'd love to hear about it.