=head1 NAME lei-daemon - technical information for local email interface daemon =head1 DESCRIPTION This documentation is a high-level overview for developers and administrators interested in how lei works. lei-daemon is a background daemon which powers the L 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. =head2 worker processes Most commands cause lei-daemon to L new worker processes to isolate and parallelize work. lei-daemon is significantly more aggressive than read-only L processes with regards to resource use since it's not designed to support C10K/C100K scenarios. =head2 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. =head2 SOCK_SEQPACKET SOCK_SEQPACKET sockets are used for both communicating with L and to internal workers. SOCK_SEQPACKET guarantees reliability (unlike SOCK_DGRAM), allows easy load distribution, and saves developers the trouble of maintaining stream parsers. =head2 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: C<$XDG_RUNTIME_DIR/lei/5.seq.sock>) is also monitored, and the daemon will automatically shutdown if it is unlinked. =head1 CONTACT Feedback welcome via plain-text mail to L The mail archives are hosted at L and L =head1 COPYRIGHT Copyright all contributors L License: AGPL-3.0+ L =head1 SEE ALSO L, L, L