.TH "MU INIT" "1" .SH "NAME" .PP mu\d\s-2init\s+2\u -- 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 starts searching at \fI\fP. By default, \fBmu\fP uses whatever the \fBMAILDIR\fP environment variable is set to; if it is not set, it tries \fI~/Maildir\fP if it already exists. .SS "--my-address=" .PP specifies that some e-mail addresses are '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 "--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 \fBinit\fP options. .SH "EXIT CODE" .PP This command returns 0 upon successful completion, or a non-zero exit code otherwise. Typical values are 2 (no matches found), 11 (database schema mismatch) and 12 (failed to acquire database lock). .SS "no matches found (2)" .PP Nothing matching found; try a different query .SS "database schema mismatch (11)" .PP You need to re-initialize \fBmu\fP, see \fBmu-init(1)\fP .SS "failed to acquire lock (19)" .PP Some other program has exclusive access to the mu (Xapian) database .SS "--muhome" .PP use a non-default directory to store and read the database, write the logs, etc. By default, \fBmu\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 \fBmu\fP defaulted to \fI~/.mu\fP, which now requires \fI\-\-muhome=~/.mu\fP. .PP The environment variable \fBMUHOME\fP can be used as an alternative to \fB--muhome\fP. The latter has precedence. .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 \fBmu\fP 1.10.8. .PP Copyright © 2022-2023 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