.\" -*- 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-DAEMON 8" .TH LEI-DAEMON 8 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\-daemon \- technical information for local email interface daemon .SH DESCRIPTION .IX Header "DESCRIPTION" This documentation is a high-level overview for developers and administrators interested in how lei works. .PP lei-daemon is a background daemon which powers the \fBlei\fR\|(1) command-line tool. It may support virtual users and read-write IMAP+JMAP APIs in the future. It is designed to optimize shell completion by avoiding module loading costs, monitor Maildirs (and in the near future, IMAP folders) for changes. .SS "worker processes" .IX Subsection "worker processes" Most commands cause lei-daemon to \fBfork\fR\|(2) new worker processes to isolate and parallelize work. lei-daemon is significantly more aggressive than read-only \&\fBpublic\-inbox\-daemon\fR\|(8) processes with regards to resource use since it's not designed to support C10K/C100K scenarios. .SS "file descriptor passing" .IX Subsection "file descriptor passing" FD passing is used to reduce IPC costs for bulk I/O when importing large mboxes from stdin and dumping large mboxes to stdout. .SS SOCK_SEQPACKET .IX Subsection "SOCK_SEQPACKET" SOCK_SEQPACKET sockets are used for both communicating with \&\fBlei\fR\|(1) and to internal workers. SOCK_SEQPACKET guarantees reliability (unlike SOCK_DGRAM), allows easy load distribution, and saves developers the trouble of maintaining stream parsers. .SS "file monitoring" .IX Subsection "file monitoring" Inotify or EVFILT_VNODE is used depending on the platform to monitor Maildirs for changes and track keyword changes. .PP The listen socket (default: \f(CW\*(C`$XDG_RUNTIME_DIR/lei/5.seq.sock\*(C'\fR) is also monitored, and the daemon will automatically shutdown if it is unlinked. .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\-overview\fR\|(7), \fBlei\-daemon\-kill\fR\|(1), \fBlei\-daemon\-pid\fR\|(1)