From 48aba1554de2a3741566df301c03c5088bc9d4dd Mon Sep 17 00:00:00 2001 From: Nogringo Date: Sun, 21 Jun 2026 15:31:20 +0200 Subject: [PATCH] Add NIP-M4: Email --- M4.md | 28 ++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 M4.md diff --git a/M4.md b/M4.md new file mode 100644 index 0000000000..73cb8ec752 --- /dev/null +++ b/M4.md @@ -0,0 +1,28 @@ +NIP-M4 +====== + +Email +----- + +`draft` `optional` + +Email over Nostr: a standard [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822) MIME message carried in the `content` of a `kind:322` event, using Nostr as transport instead of SMTP. A Nostr user's address is `@nostr`. + +## Delivery + +- **Private (default):** build the `kind:322` as an unsigned rumor and [NIP-59](59.md) gift-wrap it to each recipient and to self, published to the recipient's [NIP-17](17.md) `kind:10050` DM relays. The rumor MAY be signed to prove authorship to third parties. +- **Public:** publish a signed `kind:322` directly to [NIP-65](65.md) relays. BCC recipients are notified privately with a gift-wrapped copy carrying a `["public-ref", "", ""]` tag pointing to the public event. + +```json +{ + "kind": 322, + "content": "From: npub1alice...@nostr\r\nTo: npub1bob...@nostr\r\nSubject: Hi\r\n\r\nHey Bob" +} +``` + +## Bridges (legacy email) + +A bridge relays to and from legacy SMTP email and is discovered via [NIP-05](05.md) at `_smtp@`. + +- **Outbound (Nostr → SMTP):** gift-wrap the `kind:322` to the bridge's pubkey with `mail-from` and `rcpt-to` tags (multiple `rcpt-to` tags for several recipients). The bridge delivers via SMTP. +- **Inbound (SMTP → Nostr):** the bridge builds the `kind:322` rumor on the sender's behalf and gift-wraps it to the recipient, setting `mail-from` to the legacy sender address so the recipient can tell it apart from a direct Nostr email. diff --git a/README.md b/README.md index a3e37e99cd..371ed1f611 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ NIPs listed here are not a protocol checklist. Nothing forces any software to im - [NIP-CC: Geocaching](CC.md) - ~~[NIP-EE: E2EE Messaging using MLS Protocol](EE.md) --- **unrecommended**: superseded by the [Marmot Protocol](https://github.com/marmot-protocol/marmot)~~ - [NIP-F4: Podcasts](F4.md) +- [NIP-M4: Email](M4.md) ## Event Kinds @@ -155,6 +156,7 @@ This table is not exhaustive. For a machine-readable registry of all known event | `62` | Request to Vanish | [62](62.md) | | `64` | Chess (PGN) | [64](64.md) | | `78` | Application-specific Data | [78](78.md) | +| `322` | Email | [M4](M4.md) | | `443` | KeyPackage | [Marmot](marmot) | | `444` | Welcome Message | [Marmot](marmot) | | `445` | Group Event | [Marmot](marmot) |