C.2 Retrieving mail

C.2.1 How can I get notifications when receiving mail?

There is mu4e-index-updated-hook, which gets triggered when the indexing process triggered sees an update (not just new mail though). To use this hook, put something like the following in your setup (assuming you have aplay and some soundfile, change as needed):

(add-hook 'mu4e-index-updated-hook
  (defun new-mail-sound ()
    (shell-command "aplay ~/Sounds/boing.wav&")))

C.2.2 I’m getting mail through a local mailserver. What should I use for mu4e-get-mail-command?

Use the literal string "true" (or don’t do anything, it’s the default) which then uses /bin/true (a command that does nothing and always succeeds). This makes getting mail a no-op, but the messages are still re-indexed.

C.2.3 How can I re-index my messages without getting new mail?

Use M-x mu4e-update-index

C.2.4 When I try to run mu index while mu4e is running I get errors

For instance:

mu: mu_store_new_writable: xapian error
  'Unable to get write lock on ~/.cache/mu/xapian: already locked

What to do about this? You get this error because the underlying Xapian database is locked by some other process; it can be opened only once in read-write mode. There is not much mu4e can do about this, but if is another mu instance that is holding the lock, you can ask it to (gracefully) terminate:

   pkill -2 -u $UID mu # send SIGINT
   sleep 1
   mu index

mu4e automatically restarts mu when it needs it. In practice, this seems to work quite well.

C.2.5 How can I disable the Indexing... messages?

Set the variable mu4e-hide-index-messages to non-nil.

C.2.6 IMAP-synchronization and file-name changes

Some IMAP-synchronization programs such as mbsync (but not offlineimap) don’t like it when message files do not change their names when they are moved to different folders. mu4e can attempt to help with this - you can set the variable mu4e-change-filenames-when-moving to non-nil.

C.2.7 offlineimap and UTF-7

offlineimap uses IMAP’s UTF-7 for encoding non-ascii folder names, while mu expects UTF-8 (so, e.g. /まりもえ お19 becomes /&MH4wijCCMEgwSg-).

This is best solved by telling offlineimap to use UTF-8 instead — see this ticket.

C.2.8 mbsync or offlineimap do not sync properly

Unfortunately, mbsync and/or offlineimap do not always agree with mu about the meaning of various Maildir-flags. If you encounter unexpected behavior, it is recommended you check before and after a sync-operation. If the problem only shows up after sync’ing, the problem is with the sync-program, and it’s most productive to complain there.

Also, you may want to ensure that mu4e-index-lazy-check is kept at its default (nil) value, since it seems mbsync can make changes that escape a ’lazy’ check.

Furthermore, there have been quite a few related queries on the mailing-list; worthwhile to check out.


Footnotes

(19)

some Japanese characters