2.5 Initializing the message store

The first time you run mu, you need to initialize its store (database). The default location for that is ~/.cache/mu/xapian, but you can change this using the --muhome option, and remember to pass that to the other commands as well. Alternatively, you can use an environment variable MUHOME.

Assuming that your maildir is at ~/Maildir, we issue the following command:

  $ mu init --maildir=~/Maildir

You can add some e-mail addresses, so mu recognizes them as yours:

  $ mu init --maildir=~/Maildir --my-address=jim@example.com \
    --my-address=bob@example.com

mu remembers the maildir and your addresses and uses them when indexing messages. If you want to change them, you need to init once again.

The addresses may also be basic PCRE regular expressions, wrapped in slashes, for example:

  $ mu init --maildir=~/Maildir '--my-address=/foo-.*@example\.com/'

If you want to see the values for your message-store, you can use mu info.