1LEI-STORE-FORMAT(5)        public-inbox user manual        LEI-STORE-FORMAT(5)
2
3
4

NAME

6       lei-store-format - lei/store format description
7

DESCRIPTION

9       "lei/store" is a hybrid store based on public-inbox-extindex-format(5)
10       ("extindex") combined with public-inbox-v2-format(5) ("v2") for blob
11       storage.  While v2 is ideal for archiving a single public mailing list;
12       it was never intended for personal mail nor storing multiple blobs of
13       the "same" message.
14
15       As with extindex, it can index disparate "List-Id" headers belonging to
16       the "same" message with different git blob OIDs.  Unlike v2 and
17       extindex, "Message-ID" headers are NOT required; allowing unsent draft
18       messages to be stored and indexed.
19

DIRECTORY LAYOUT

21       Blob storage exists in the form of v2-style epochs.  These epochs are
22       under the "local/" directory (instead of "git/") to prevent them from
23       being accidentally treated as a v2 inbox.
24
25   INDEX OVERVIEW AND DEFINITIONS
26         $EPOCH - Integer starting with 0 based on time
27         $SCHEMA_VERSION - DB schema version (for Xapian)
28         $SHARD - Integer starting with 0 based on parallelism
29
30         ~/.local/share/lei/store
31         - local/$EPOCH.git                # normal bare git repositories
32         - mail_sync.sqlite3               # sync state IMAP, Maildir, NNTP
33
34       Additionally, the following share the same roles they do in extindex:
35
36         - ei.lock                         # lock file to protect global state
37         - ALL.git                         # empty, alternates for local/*.git
38         - ei$SCHEMA_VERSION/$SHARD        # per-shard Xapian DB
39         - ei$SCHEMA_VERSION/over.sqlite3  # overview DB for WWW, IMAP
40         - ei$SCHEMA_VERSION/misc          # misc Xapian DB
41
42   XREF3 DEDUPLICATION
43       Index deduplication follows extindex, see "XREF3 DEDUPLICATION" in
44       public-inbox-extindex-format(5) for more information.
45
46   BLOB DEDUPLICATION
47       The contents of "local/*.git" repos is deduplicated by git blob object
48       IDs (currently SHA-1).  This allows multiple copies of cross-posted and
49       personally Cc-ed messages to be stored with different "Received:",
50       "X-Spam-Status:" and similar headers to allow troubleshooting.
51
52   VOLATILE METADATA
53       Keywords and label information (as described in RFC 8621 for JMAP) is
54       stored in existing Xapian shards ("ei$SCHEMA_VERSION/$SHARD").  It is
55       possible to search for messages matching labels and keywords using "L:"
56       and "kw:", respectively.  As with all data stored in Xapian indices,
57       volatile metadata is associated with the Xapian document, thus it is
58       shared across different blobs of the "same" message.
59
60   mail_sync.sqlite3
61       This SQLite database maintained for bidirectional mapping of git blobs
62       to IMAP UIDs, Maildir file names, and NNTP article numbers.
63
64       It is also used for retrieving messages from Maildirs indexed by
65       lei-index(1).
66

IPC

68       lei-daemon(8) communicates with the "lei/store" process using unix(7)
69       "SOCK_SEQPACKET" sockets.
70

CAVEATS

72       Reindexing and synchronization is not yet supported.
73

THANKS

75       Thanks to the Linux Foundation for sponsoring the development and
76       testing.
77
79       Copyright 2021 all contributors <mailto:meta@public-inbox.org>
80
81       License: AGPL-3.0+ <http://www.gnu.org/licenses/agpl-3.0.txt>
82

SEE ALSO

84       public-inbox-v2-format(5), public-inbox-extindex(5)
85
86
87
88public-inbox.git                  1993-10-02               LEI-STORE-FORMAT(5)
Impressum