1LEI-MAIL-FORMATS(5) public-inbox user manual LEI-MAIL-FORMATS(5)
2
3
4
6 lei-mail-formats - description of mail formats supported by lei
7
9 lei-q(1) supports writing to several existing mail formats for
10 interoperability with existing mail user agents (MUA); below is an
11 overview of them to help users choose.
12
14 The default output format when given a filesystem path, it supports
15 parallel read-write access. Performance is acceptable for smaller
16 directories, but degrades as mailboxes get larger. Speed and
17 scalability are limited by kernel and filesystem performance due to the
18 use of small files and large number of syscalls.
19
20 See also: <https://cr.yp.to/proto/maildir.html> and
21 <https://wiki2.dovecot.org/MailboxFormat/Maildir>
22
24 The mbox family consists of several incompatible formats. Locking for
25 parallel access is supported, but may not be compatible across tools.
26 With compression (e.g. gzip(1)), they require the least amount of space
27 while offering good read-only performance.
28
29 Keyword updates ("Status:" and/or "X-Status:" headers) generally
30 require rewriting the entire mbox.
31
32 See also:
33 <https://www.loc.gov/preservation/digital/formats/fdd/fdd000383.shtml>,
34 mbox(5)
35
36 mboxo
37 The traditional BSD format. It quotes "From " to ">From ", but lines
38 already beginning with ">From " do not get quoted, thus automatic
39 reversibility is not guaranteed. MUAs which favor "mboxcl" or
40 "mboxcl2" may convert these automatically to their preferred format.
41
42 Truncation is undetectable unless compressed with gzip or similar.
43
44 mboxrd
45 An evolution of "mboxo", but quotes "From " lines prefixed with any
46 number of ">" characters and is thus fully reversible.
47
48 This format is emitted by PublicInbox::WWW(3pm) with gzip. Since git
49 2.10, "git am --patch-format=mboxrd" reads this format. "git log" and
50 "git format-patch --stdout" can also generate this format with the
51 "--pretty=mboxrd" switch.
52
53 As with uncompressed "mboxo", uncompressed mboxrd are vulnerable to
54 undetectable truncation.
55
56 It gracefully degrades to being treated as "mboxo" by MUAs unaware of
57 the format as excessive ">From " quoting is recognizable to humans.
58
59 mboxcl
60 "mboxo" with a "Content-Length:" header, "From " lines remain quoted to
61 retain readability with "mboxo" and "mboxrd" MUAs. However, it is easy
62 to corrupt these files when using tools which are not aware of
63 "Content-Length:" and write out updates as "mboxo".
64
65 mutt(1) will convert "mboxo" and "mboxrd" to mboxcl upon opening.
66
67 See also: <https://www.jwz.org/doc/content-length.html>
68
69 mboxcl2
70 Like "mboxcl", but without "From " any quoting. It is wholly
71 incompatible with MUAs which only handle "mboxo" and/or "mboxrd". This
72 is format is generated by mutt(1) when writing to a new mbox.
73
75 Not yet supported, locking semantics (or lack thereof) appear to make
76 it unsuitable for parallel access. It is widely-supported by a variety
77 of MUAs and mailing list managers, however.
78
80 Not yet supported, and it's unclear if current usage/support makes it
81 worth supporting.
82
84 Depending on the IMAP server software and configuration, IMAP servers
85 may use any (or combination) of the aforementioned formats or a non-
86 standard database backend. Currently, lei uses Mail::IMAPClient which
87 has acceptable performance over low-latency links. Performance over
88 high-latency links is currently poor.
89
91 A single raw message file. "eml" is not an output format for lei, but
92 accepted by as an "--input-format" ("-F") for read-only commands such
93 as lei-tag(1) and lei-import(1).
94
95 Since "eml" is the suffix for the "message/rfc822" MIME type (according
96 to the "mime.types" file), lei will infer the type based on the ".eml"
97 suffix if "--input-format" is unspecified
98
99 ".patch"-suffixed files generated by git-format-patch(1) (without
100 "--stdout") are "eml" files with the addition of an mbox "From "
101 header. lei(1) removes "From " lines to treat them as "eml" when
102 reading these for compatibility with "git-am(1)" and similar tools.
103
105 Copyright 2021 all contributors <mailto:meta@public-inbox.org>
106
107 License: AGPL-3.0+ <http://www.gnu.org/licenses/agpl-3.0.txt>
108
110 lei(1), lei-q(1), lei-convert(1), lei-overview(7)
111
112
113
114public-inbox.git 1993-10-02 LEI-MAIL-FORMATS(5)