Export to GitHub

mu0 - issue #45

mu4e fails to index after updating email in maildirs


Posted on Mar 13, 2012 by Swift Cat

What steps will reproduce the problem?

  1. M-x mu4e
  2. U

What is the expected output? What do you see instead?

From Messages buffer: Started mu4e with 16332 messages in store Retrieving mail... Updating the database... Error 1: indexing failed

What version of the product are you using? On what operating system?

  • User-agent: mu4e 0.9.8.1; emacs 23.3.1
  • Ubuntu 11.10; using Gnome 3.

Please provide any additional information below.

Configuration snippets:

Emacs: (when (require 'mu4e nil 'noerror) (setq mu4e-user-mail-address-regexp "jladan@example.com" mu4e-maildir "~/Mail" ;; top-level Maildir mu4e-sent-folder "/Archive" ;; where do i keep sent mail? mu4e-drafts-folder "/Drafts" ;; where do i keep half-written mail? mu4e-trash-folder "/Trash" ;; where do i move deleted mail? mu4e-maildir-shortcuts '( ("/INBOX" . ?i) ("/Archive" . ?a) ("/lists.tup" . ?t)) mu4e-html2text-command "html2text" mu4e-get-mail-command "pullmail-mu4e"))

"pullmail-mu4e" is a symlink to "pullmail", attached.

Attachments

Comment #1

Posted on Mar 13, 2012 by Swift Cat

Aside: If I run my "pullmail" script outside of mu4e, but while mu4e is open, I get the error: mu: mu_store_new_writable: xapian error 'Unable to get write lock on /home/james/.mu/xapian: already locked'

If I leave the script running from cron, should I just hide errors from mu and leave indexing up to mu4e itself?

Comment #2

Posted on Mar 14, 2012 by Massive Monkey

Current Xapian versions can only be opened once in read-write mode; which is a bit annoying if you use mu4e and some downloading in the background...

So, you can either do all the downloading in mu4e, or, if you want to use some external script, make it terminate the running mu instance (mu4e will recreate it, when needed).

You can terminate mu gracefully by sending it SIGTERM (2) (e.g., using pkill), and you can do just before updating the database (add a 1s sleep).

I'll add a note about that to the docs.

Note, in your script, you may want to use offlineimap -u quiet to avoid any output.

Thanks, Dirk.

Comment #3

Posted on Mar 16, 2012 by Swift Cat

Indexing after 'U' is also fine now that I've changed "~/Mail" to "/home/james/Mail".

(BTW - I use .offlineimaprc to set the quiet UI :))

Comment #4

Posted on Mar 20, 2012 by Swift Cat

Following up on that 'aside' above, thanks for the auto-update feature. Now I leave email fetching to mu4e and don't bother with cron.

Comment #5

Posted on Mar 20, 2012 by Massive Monkey

Ah, thanks. Closing this then.

Status: Fixed

Labels:
Type-Defect Priority-Medium