LEI-DAEMON(8)
π NAME π
lei-daemon β technical information for local email interface daemon. That's the official NAME drop, bestie, and you're in the lei-daemon(8) page of the public-inbox user manual. π«Ά
β¨ DESCRIPTION β¨
This is the high-level overview for developers and administrators interested in how lei works. No cap.
lei-daemon is a background daemon which powers the lei(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, and to monitor Maildirs (and in the near future, IMAP folders) for changes. β¨
π§ worker processes π§
Most commands cause lei-daemon to fork(2) new worker processes to isolate and parallelize work. lei-daemon is significantly more aggressive than read-only public-inbox-daemon(8) processes with regards to resource use, since it's not designed to support C10K/C100K scenarios. Like, it's not here to host the whole internet, iykyk. π
π 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. It's giving efficient little handoff. π
π¬ SOCK_SEQPACKET π¬
SOCK_SEQPACKET sockets are used for both communicating with lei(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. Obsessed with not writing stream parsers, honestly. π¦
π file monitoring π
Inotify or EVFILT_VNODE is used depending on the platform to monitor Maildirs for changes and track keyword changes.
The listen socket (default: $XDG_RUNTIME_DIR/lei/5.seq.sock) is also monitored, and the daemon will automatically shutdown if it is unlinked. So don't go unlinkin' it unless you want it gone, bestie. π
π«Ά CONTACT π«Ά
Feedback welcome via plain-text mail to <mailto:meta@public-inbox.org>. π§
The mail archives are hosted at <https://public-inbox.org/meta/> and <http://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/meta/>. πΈ
π COPYRIGHT π
Copyright all contributors <mailto:meta@public-inbox.org>. π
License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>. β
π SEE ALSO π
Okay that's the whole page, bestie β source/version public-inbox.git, dated 1993-10-02, signing off with maximum sparkle. πβ¨
π¦ where this page comes from
- arch rolling: lei 2.1.0-2 Β· AGPL
- nixos 26.05: perl5.42.3-public-inbox 2.1.0
- nixpkgs unstable: perl5.42.3-public-inbox 2.1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms