.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "LEI-OVERVIEW 7" .TH LEI-OVERVIEW 7 1993-10-02 public-inbox.git "public-inbox user manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME lei \- an overview of lei .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBlei\fR\|(1) is a local email interface for public-inbox and personal mail. This document provides some basic examples. .SH "LEI STORE" .IX Header "LEI STORE" lei has writable local storage based on \fBpublic\-inbox\-v2\-format\fR\|(5). Commands will automatically initialize the store behind the scenes if needed, but you can call \fBlei\-init\fR\|(1) directly if you want to use a store location other than the default \f(CW\*(C`$XDG_DATA_HOME/lei/store\*(C'\fR. .PP The \fBlei\-import\fR\|(1) command provides the primary interface for importing messages into the local storage. In addition, other commands, such as \fBlei\-q\fR\|(1) and \fBlei\-blob\fR\|(1), use the local store to memoize messages from remotes. .SS EXAMPLES .IX Subsection "EXAMPLES" .IP "$ lei import mboxrd:t.mbox.gz" 4 .IX Item "$ lei import mboxrd:t.mbox.gz" Import the messages from a gzipped mboxrd into the local storage. .IP "$ lei blob 59ec517f9" 4 .IX Item "$ lei blob 59ec517f9" Show message with the git blob OID of 59ec517f9. If a message with that OID isn't found, check if the current git repository has the blob, trying to reconstruct it from a message if needed. .IP "$ lei blob 59ec517f9 | lei tag \-F eml +kw:flagged +L:next" 4 .IX Item "$ lei blob 59ec517f9 | lei tag -F eml +kw:flagged +L:next" Set the "flagged" keyword and "next" label on the message with the blob OID of 59ec517f9. .SH EXTERNALS .IX Header "EXTERNALS" In addition to the above store, lei can make read-only queries to "externals": inboxes and external indices. An external can be registered by passing a URL or local path to \fBlei\-add\-external\fR\|(1). For existing local paths, the external needs to be indexed with \&\fBpublic\-inbox\-index\fR\|(1) (in the case of a regular inbox) or \&\fBpublic\-inbox\-extindex\fR\|(1) (in the case of an external index). .SH SYNCHRONIZATION .IX Header "SYNCHRONIZATION" lei currently has primitive mail synchronization abilities; see \fBlei\-mail\-sync\-overview\fR\|(7) for more details. .SS EXAMPLES .IX Subsection "EXAMPLES" .IP "$ lei add-external https://public\-inbox.org/meta/" 4 .IX Item "$ lei add-external https://public-inbox.org/meta/" Add a remote external for public-inbox's inbox. .IP "$ lei add-external \-\-mirror https://public\-inbox.org/meta/ path" 4 .IX Item "$ lei add-external --mirror https://public-inbox.org/meta/ path" Clone to \f(CW\*(C`path\*(C'\fR, index it with \&\fBpublic\-inbox\-index\fR\|(1), and add it as a local external. .SH SEARCHING .IX Header "SEARCHING" The \fBlei\-q\fR\|(1) command searches the local store and externals. The search prefixes match those available via \fBpublic\-inbox\-httpd\fR\|(1). .SS EXAMPLES .IX Subsection "EXAMPLES" .IP "$ lei q s:lei s:skeleton" 4 .IX Item "$ lei q s:lei s:skeleton" Search for messages whose subject includes "lei" and "skeleton". .IP "$ lei q \-t s:lei s:skeleton" 4 .IX Item "$ lei q -t s:lei s:skeleton" Do the same, but also report unmatched messages that are in the same thread as a matched message. .IP "$ lei q \-t \-o /tmp/mdir \-\-mua=mutt s:lei s:skeleton" 4 .IX Item "$ lei q -t -o /tmp/mdir --mua=mutt s:lei s:skeleton" Write results to a Maildir at "mdir". Mutt will be invoked to open mfolder (\f(CW\*(C`mutt \-f %f\*(C'\fR) while results are being fetched and written. .IP "$ lei q kw:flagged L:next" 4 .IX Item "$ lei q kw:flagged L:next" Search for all flagged messages that also have a "next" label. .IP "$ lei p2q HEAD | lei q \-tt \-o /tmp/mdir" 4 .IX Item "$ lei p2q HEAD | lei q -tt -o /tmp/mdir" Search for messages that have post-image git blob IDs that match those of the current repository's HEAD commit, writing them to the Maildir directory "mdir" and flagging the messages that were an exact match. .IP "$ git show \-s HEAD | lei lcat" 4 .IX Item "$ git show -s HEAD | lei lcat" Display a local message for the public-inbox link contained in a commit message. .IP "$ lei q \-f text m:MESSAGE\-ID | lei rediff \-U5" 4 .IX Item "$ lei q -f text m:MESSAGE-ID | lei rediff -U5" Feed a message containing a diff to \fBlei\-rediff\fR\|(1) to regenerate its diff with five context lines. Unless \f(CW\*(C`\-\-git\-dir\*(C'\fR is specified, this requires the current working directory to be within the associated code repository. .SH "PERFORMANCE NOTES" .IX Header "PERFORMANCE NOTES" Inline::C is required, lei runs as a background daemon to reduce startup costs and can provide real-time \fBkqueue\fR\|(2)/\fBinotify\fR\|(7) Maildir monitoring. IO::KQueue (p5\-IO\-KQueue on FreeBSD) and Linux::Inotify2 (liblinux\-inotify2\-perl and perl\-Linux\-Inotify2 in \&.deb and .rpm\-based distros, respectively) are recommended. .PP Socket::MsgHdr is optional (libsocket-msghdr-perl in Debian), and further improves startup performance. Its effect is most felt when using shell completion. .SH "BASH COMPLETION" .IX Header "BASH COMPLETION" Preliminary Bash completion for lei is provided in \&\f(CW\*(C`contrib/completion/\*(C'\fR. Contributions adding support for other shells, as well as improvements to the existing Bash completion, are welcome. .SH UPGRADING .IX Header "UPGRADING" Since lei runs as a daemon, \fBlei\-daemon\-kill\fR\|(1) is required to kill the daemon so it can load new code. It will be restarted with the next invocation of any lei command. .SH CAVEATS .IX Header "CAVEATS" IMAP and NNTP client performance is poor on high-latency connections. It will hopefully be fixed in 2022. .SH CONTACT .IX Header "CONTACT" Feedback welcome via plain-text mail to .PP The mail archives are hosted at and .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright all contributors .PP License: AGPL\-3.0+ .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBlei\-mail\-sync\-overview\fR\|(7)