1LEI-OVERVIEW(7) public-inbox user manual LEI-OVERVIEW(7)
2
3
4
6 lei - an overview of lei
7
9 lei(1) is a local email interface for public-inbox and personal mail.
10 This document provides some basic examples.
11
13 lei has writable local storage based on public-inbox-v2-format(5).
14 Commands will automatically initialize the store behind the scenes if
15 needed, but you can call lei-init(1) directly if you want to use a
16 store location other than the default "$XDG_DATA_HOME/lei/store".
17
18 The lei-import(1) command provides the primary interface for importing
19 messages into the local storage. In addition, other commands, such as
20 lei-q(1) and lei-blob(1), use the local store to memoize messages from
21 remotes.
22
23 EXAMPLES
24 $ lei import mboxrd:t.mbox.gz
25 Import the messages from a gzipped mboxrd into the local storage.
26
27 $ lei blob 59ec517f9
28 Show message with the git blob OID of 59ec517f9. If a message with
29 that OID isn't found, check if the current git repository has the
30 blob, trying to reconstruct it from a message if needed.
31
32 $ lei blob 59ec517f9 | lei tag -F eml +kw:flagged +L:next
33 Set the "flagged" keyword and "next" label on the message with the
34 blob OID of 59ec517f9.
35
37 In addition to the above store, lei can make read-only queries to
38 "externals": inboxes and external indices. An external can be
39 registered by passing a URL or local path to lei-add-external(1). For
40 existing local paths, the external needs to be indexed with
41 public-inbox-index(1) (in the case of a regular inbox) or
42 public-inbox-extindex(1) (in the case of an external index).
43
45 lei currently has primitive mail synchronization abilities; see
46 lei-mail-sync-overview(7) for more details.
47
48 EXAMPLES
49 $ lei add-external https://public-inbox.org/meta/
50 Add a remote external for public-inbox's inbox.
51
52 $ lei add-external --mirror https://public-inbox.org/meta/ path
53 Clone <https://public-inbox.org/meta/> to "path", index it with
54 public-inbox-index(1), and add it as a local external.
55
57 The lei-q(1) command searches the local store and externals. The
58 search prefixes match those available via public-inbox-httpd(1).
59
60 EXAMPLES
61 $ lei q s:lei s:skeleton
62 Search for messages whose subject includes "lei" and "skeleton".
63
64 $ lei q -t s:lei s:skeleton
65 Do the same, but also report unmatched messages that are in the
66 same thread as a matched message.
67
68 $ lei q -t -o /tmp/mdir --mua=mutt s:lei s:skeleton
69 Write results to a Maildir at "mdir". Mutt will be invoked to open
70 mfolder ("mutt -f %f") while results are being fetched and written.
71
72 $ lei q kw:flagged L:next
73 Search for all flagged messages that also have a "next" label.
74
75 $ lei p2q HEAD | lei q -tt -o /tmp/mdir
76 Search for messages that have post-image git blob IDs that match
77 those of the current repository's HEAD commit, writing them to the
78 Maildir directory "mdir" and flagging the messages that were an
79 exact match.
80
81 $ git show -s HEAD | lei lcat
82 Display a local message for the public-inbox link contained in a
83 commit message.
84
85 $ lei q -f text m:MESSAGE-ID | lei rediff -U5
86 Feed a message containing a diff to lei-rediff(1) to regenerate its
87 diff with five context lines. Unless "--git-dir" is specified,
88 this requires the current working directory to be within the
89 associated code repository.
90
92 Inline::C is required, lei runs as a background daemon to reduce
93 startup costs and can provide real-time kqueue(2)/inotify(7) Maildir
94 monitoring. IO::KQueue (p5-IO-KQueue on FreeBSD) and Linux::Inotify2
95 (liblinux-inotify2-perl and perl-Linux-Inotify2 in .deb and .rpm-based
96 distros, respectively) are recommended.
97
98 Socket::MsgHdr is optional (libsocket-msghdr-perl in Debian), and
99 further improves startup performance. Its effect is most felt when
100 using shell completion.
101
103 Preliminary Bash completion for lei is provided in
104 "contrib/completion/". Contributions adding support for other shells,
105 as well as improvements to the existing Bash completion, are welcome.
106
108 Since lei runs as a daemon, lei-daemon-kill(1) is required to kill the
109 daemon so it can load new code. It will be restarted with the next
110 invocation of any lei command.
111
113 IMAP and NNTP client performance is poor on high-latency connections.
114 It will hopefully be fixed in 2022.
115
117 Feedback welcome via plain-text mail to <mailto:meta@public-inbox.org>
118
119 The mail archives are hosted at <https://public-inbox.org/meta/> and
120 <http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>
121
123 Copyright all contributors <mailto:meta@public-inbox.org>
124
125 License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
126
128 lei-mail-sync-overview(7)
129
130
131
132public-inbox.git 1993-10-02 LEI-OVERVIEW(7)