Mailboxes and the Blobchain

A mailbox can be seen as a directory containing a number of content addressed files, each of which represent an individual unit of mail. In other words, the filename of each mail file is the SHA256 hash of its content which is to contain a timestamp at the very beginning, followed by two newlines and the mail body.

A mail unit is to be treated as an immutable envelope containing metadata followed by the mail contents.  To reduce filesystem pressure, each mail unit lives within a directory named after the first two bytes of the hash (xx/xxxxx...).

To prevent tampering of the mailbox, each mail unit contains references to the next and previous mail unit in the form of a mailbox name, delimited by a ':' and followed by the mail unit's content addressed hash:

All mail units are to follow the given format:

<ASCII TIMESTAMP>
<MAILBOX>:<PREVIOUS HASH IN BINARY>
<MAILBOX>:<NEXT HASH IN BINARY>
\n\n
<CONTENT>   

Attempting to alter the contents of any mail unit may result in data loss and cause affected units to be rejected by the mail-server and/or client.


Revision #2
Created 2026-05-02 02:53:25 UTC by Chloe
Updated 2026-05-03 06:07:51 UTC by Chloe