.ftr C B .TH "MU INIT" "1" .SH "NAME" .PP mu-init - initialize the mu message database .SH "SYNOPSIS" .PP \fBmu [common-options] init [options]\fP .SH "DESCRIPTION" .PP \fBmu init\fP is the subcommand for setting up the mu message database. After \fBmu init\fP has completed, you can run \fBmu index\fP .SH "INIT OPTIONS" .SS "-m, --maildir=" .PP use \fI\fP as the root-maildir. .PP By default, \fBmu\fP uses the \fBMAILDIR\fP environment; if it is not set, it uses \fI~/Maildir\fP if it is an existing directory. If neither of those can be used, the \fC\-\-maildir\fP option is required; it must be an absolute path (but \fC~/\fP expansion is performed). .SS "--my-address=" .PP specifies that some e-mail address is `my-address' (the option can be used multiple times). Any message in which at least one of the contact fields contains such an address is considered a `personal' messages; this can then be used for filtering in \fBmu-find(1)\fP, \fBmu-cfind(1)\fP and \fBmu4e\fP, e.g. to filter-out mailing list messages. .PP \fI\fP can be either a plain e-mail address (such as \fBfoo@example.com\fP), or a basic PCRE regular-expression (see \fBpcre(3)\fP for details), wrapped in \fB/\fP (such as \fI/foo\-.*@example\\.com/\fP). Depending on your shell, the argument may need to be quoted. .SS "--ignored-address=" .PP specifies that some e-mail address is to be ignored from the contacts-cache (the option can be used multiple times). Such addresses then cannot be found with \fBmu-cfind(1)\fP or in the Mu4e contacts cache. .PP \fI\fP can be either a plain e-mail address or a regexp, just like for the \fI\-\-my\-address\fP option. .SS "--max-message-size=" .PP specifies the maximum size for an e-mail message. Usually, the default of 100000000 bytes should be fine. .SS "--batch-size=" .PP the number of changes after which they are committed to the database; decreasing the value reduces the memory requirements, at the cost of make indexing substantially slower. Usually, the default of 250000 should be fine. .PP Batch-size 0 is interpreted as `use the default'. .SS "--support-ngrams" .PP whether to enable support for using ngrams in indexing and query parsing; this can be useful for languages without explicit word breaks, such as Chinese/Japanese/Korean. See \fBNGRAM SUPPORT\fP below for details. .SS "--reinit" .PP reinitialize the database from an earlier version; that is, create a new empty database with the existing settings. This cannot be combined with the other \fCinit\fP options. .SS "--muhome" .PP use a non-default directory to store and read the database, write the logs, etc. By default, \fCmu\fP uses the XDG Base Directory Specification (e.g. on GNU/Linux this defaults to \fI~/.cache/mu\fP and \fI~/.config/mu\fP). Earlier versions of \fCmu\fP defaulted to \fI~/.mu\fP, which now requires \fI\-\-muhome=~/.mu\fP. .PP The environment variable \fCMUHOME\fP can be used as an alternative to \fC\-\-muhome\fP. The latter has precedence. .SH "NGRAM SUPPORT" .PP \fBmu\fP's underlying Xapian database supports `ngrams', which improve searching for languages/scripts that do not have explicit word breaks, such as Chinese, Japanese and Korean. It is fairly intrusive, and influences both indexing and query-parsing; it is not enabled by default, and is recommended only if you need to search for messages written in such languages. .PP When enabled, \fBmu\fP automatically uses ngrams automatically. Xapian environment variables such as \fCXAPIAN_CJK_NGRAM\fP are ignored. .SH "EXIT CODE" .PP This command returns 0 upon successful completion, or a non-zero exit code otherwise. .IP 0. 4 success .IP 2. 4 no matches found. Try a different query .IP 11. 4 database schema mismatch. You need to re-initialize \fCmu\fP, see \fBmu-init(1)\fP .IP 19. 4 failed to acquire lock. Some other program has exclusive access to the mu database .IP 99. 4 caught an exception .SH "EXAMPLE" .RS .nf $ mu init --maildir=~/Maildir --my-address=alice@example.com --my-address=bob@example.com --ignored-address='/.*reply.*/' .fi .RE .SH "REPORTING BUGS" .PP Please report bugs at \fIhttps://github.com/djcb/mu/issues\fP. .SH "AUTHOR" .PP Dirk-Jan C. Binnema .SH "COPYRIGHT" .PP This manpage is part of \fCmu\fP 1.12.4. .PP Copyright © 2008-2024 Dirk-Jan C. Binnema. License GPLv3+: GNU GPL version 3 or later \fIhttps://gnu.org/licenses/gpl.html\fP. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH "SEE ALSO" .PP \fBmu-index(1)\fP, \fBmu-find(1)\fP, \fBmu-cfind(1)\fP, \fBpcre(3)\fP