mu-server - Man Page

the mu backend for the mu4e e-mail client

Synopsis

mu [common-options] server

Description

mu server starts a simple shell in which one can query and manipulate the mu database. The output uses s-expressions. mu server is not meant for use by humans, except for debugging purposes. Instead, it is designed specifically for the mu4e e-mail client.

(<command-name> :param1 value1 :param2 value2)

For example, to view a certain message, the command would be:

(view :docid 12345)

Parameters can be sent in any order; they must be of the correct type though. See lib/utils/mu-sexp-parser.hh and lib/utils/mu-sexp-parser.cc in source-tree for the details.

Output Format

mu server accepts a number of commands, and delivers its results in the form:

\376<length>\377<s-expr>

\376 (one byte 0xfe), followed by the length of the s-expression expressed as an hexadecimal number, followed by another \377 (one byte 0xff), followed by the actual s-expression.

By prefixing the expression with its length, it can be processed more efficiently. The \376 and \377 were chosen since they never occur in valid UTF-8 (in which the s-expressions are encoded).

Server Options

--commands

List available commands (and try with --verbose)

--eval <expression>

Evaluate a mu4e server s-expression

--allow-temp-file

If set, allow for the output of some commands to use temp-files rather than directly through the emacs process input/output. This is noticeably faster for commands with a lot of output, esp. when the the temp-file uses a in-memory file-system.

Performance

As an indication for the relative performance, we can simulate something mu4e does; we take overall time of 50 such requests:

time build/mu/mu server --allow-temp-file --eval '(find :query "

(and --allow-temp-file for 1.11)

releasetime (sec)
1.88.6s
1.105.7s
1.11 (master)2.8s

--muhome

use a non-default directory to store and read the database, write the logs, etc. By default, mu uses the XDG Base Directory Specification (e.g. on GNU/Linux this defaults to ~/.cache/mu and ~/.config/mu). Earlier versions of mu defaulted to ~/.mu, which now requires --muhome=~/.mu.

The environment variable MUHOME can be used as an alternative to --muhome. The latter has precedence.

Common Options

-d, --debug

makes mu generate extra debug information, useful for debugging the program itself. By default, debug information goes to the log file, ~/.cache/mu/mu.log. It can safely be deleted when mu is not running. When running with --debug option, the log file can grow rather quickly. See the note on logging below.

-q, --quiet

causes mu not to output informational messages and progress information to standard output, but only to the log file. Error messages will still be sent to standard error. Note that mu index is much faster with --quiet, so it is recommended you use this option when using mu from scripts etc.

--log-stderr

causes mu to not output log messages to standard error, in addition to sending them to the log file.

--nocolor

do not use ANSI colors. The environment variable NO_COLOR can be used as an alternative to --nocolor.

-V, --version

prints mu version and copyright information.

-h, --help

lists the various command line options.

Reporting Bugs

Please report bugs at https://github.com/djcb/mu/issues.

Author

Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>

See Also

mu(1)

Referenced By

mu(1).