2012-10-15

mu4e v0.9.9 is out!

I few months ago, I introduced mu4e, a modest little emacs mail client that I wrote. It seems many people picked it up, great!

what's new?

I have just released mu/mu4e version 0.9.9. There are quite a few changes, both user-visible and 'under-the-hood'. I've also spent some time on improving the manual (pdf), and I'm quite happy about it.

Some of the more visible new things in mu4e are:

  • Support for crypto (decrypting messages, signing them)
  • Support for refiling (like mutt, Wanderlust)
  • Dynamic folders (instead of hard-coding the sent/draft/trash/refile folder, they can be functions that return different folders based on the message we're dealing with, see the example below)
  • Same for the folder to save attachments
  • A lot of smaller and bigger UI improvements

Also, the core mu program has seen a lot of improvements (many of which directly improve mu4e as well)

  • Better support for non-ascii locales / character sets, such as ISO-2022-JP
  • Improved on-line help ('mu help ...')
  • Performance improvements for threaded display (~ 25% for 23K messages)

For a more complete list, see NEWS.

dynamic folders

As mentioned, mu4e now supports dynamic folders. Before, you'd set your trash folder to some static string:

(setq mu4e-trash-folder "/trash")

In some cases, you may want to have a bit more flexibility – for example, have a separate trash-folder (or sent-folder, drafts-folder, refile-folder) for private mail and work mail. You can now do something like:

(setq mu4e-trash-folder
  (lambda (msg)
    (if (and msg ;; msg may be nil
          (mu4e-message-contact-field-matches msg :to "me@work.com"))
      "/trash-work"
      "/trash")))

refiling

After I have dealt with some e-mail, I either delete it or move it to some archive folder – refiling. For this, there is now the r keybinding, and mu4e-refile-folder; and a place where dynamic folders really shine:

(setq mu4e-refile-folder
  (lambda (msg)
    (cond
      ;; messages to the mu mailing list go to the /mu folder
      ((mu4e-message-contact-field-matches msg :to
         "mu-discuss@googlegroups.com")
        "/mu")
      ;; messages sent directly to me go to /archive
      ;; also `mu4e-user-mail-address-regexp' can be used
      ((mu4e-message-contact-field-matches msg :to "me@example.com")
        "/private")
      ;; messages with football or soccer in the subject go to /football
      ((string-match "football\\|soccer" (or (mu4e-message-field msg :subject) ""))
        "/football")
      ;; everything else goes to /archive
      ;; important to have a catch-all at the end!
      (t "/archive"))))

How cool is that? After reading my inbox folder, I select all messages (C-x h), press r, and they're all moved to the right refiling folder.

crypto support

mu4e already supported signing/encrypting messages, but now it supports decryption and verifying signatures as well. This was one of the most requested new features. I think it is still a bit rough, but it has been working very well for me.

so…

I think version 0.9.9 is a great new step for mu4e. It already goes far beyond I ever planned to do. I received a lot of suggestions for new features, which is great! I'm not planning to implement all of those, but I will try to make mu4e even more programmable – it should be easy to augment mu4e with your own little elisp-snippets – the Barbapapa principle of software, already so clearly present in emacs itself.

16 comments:

Anonymous said...

Awesome work!
Will try to migrate one of my accounts for sure.
Speaking of which - unless I miss something manual do not pay special attention to multiaccount setup. For example I have 2 gmail accounts and 3 accounts on other servers. How do I comfigure smtpmail so it will automatically pick right account depending on From: field?
Will offlineimap work fine if I sync both gmail accounts into common inbox or I should create as many subfolders as I have accounts?
Don't get me wrong - the manual is awesome in covering most common usage, but it's more complex setup is what really makes you read through manual :-)

djcb said...

@Anonymous: see par. 6.4 "Compose hooks" in the manual, and check the mu mailing-list, where this was discussed a few times.

You can use offlineimap either way, but it's probably cleaner to have ~/Maildir/acc1, ~/Maildir/acc2 etc.

Anonymous said...

Excellent stuff!

By the way, I am struggling to define an action which both marks messages and read and refiles them, as you can only mark (seemingly) one of these things at once, if you could explain how to do this I would be most grateful.

Ta!

djcb said...

@draxil: that's not currently possible -- but the ML for some recent discussion about this, and possible workarounds.

Mandar Mitra said...

Thanks very much for mu and mu4e! I have been using mutt for many years,
and mutt within emacs more recently (and found your earlier post on this
useful), but wanted to move to something that's (almost) completely emacs
based. mu4e looks the most promising. I'm making an entry on the
Emacswiki page explaining
why I'm working on moving to mu4e in case it's of any use to other people
on a similar quest.

Anonymous said...

@djcb Thanks. It's worth pointing out I only need this because the unread search bookmark is so useful!

Anonymous said...

I try to build mu4e from the tarball and git but without success.
In both cases I'm stuck with
./configure it gives me this:
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... no
configure: error: in `/home/sewi/programy/mu':
configure: error: C++ compiler cannot create executables
See `config.log' for more details

I'm under debian sid amd64, g++ 4.7 etc. Any hits?

djcb said...

@Anonymous: maybe check config.log for some hint? I have a machine with same setup here (debian-sid, amd64, g++ 4.7) and it works fine.

Anonymous said...

@djcb thanks. the problem was with my invalid CFLAGS in .bash_profile file which I copied from my previous 32bit PC. Now it works!

Dmitry said...

Hi,

for some reason messages in cyrillic don't show a letter 'б', while other letters are fine. I wonder is it a bug in offlineimap or in mu4e. How can I troubleshoot it?

Anonymous said...

It looks awesome. I readed de manual and I will try to use mu4e as my e-mail client.

Thanks for the work.

Anonymous said...

Hi,

I'm trying it out, and I'd just like to report a mistake in your example of start-up configuration of the manual. It is in this file :
http://www.djcbsoftware.nl/code/mu/mu4e/Gmail-configuration.html#Gmail-configuration

on the line about the Maildir location : 
;; (setq mu4e-maildir ("~/Maildir")

The second left parenthesis shouldn't be here. I finally saw it.


Thanks ! (and congrats)

Vincent

Anonymous said...

Thanks for mu4e!! I am now setting it up, and it works like a charm.

Anonymous said...

Hey are there any news on the development of mu4e? is it still active?

djcb said...

Sure -- mu/mu4e are alive and kicking; check the mailing list / git.

It's about time for a new release...

Unknown said...

Great! Is there any chance to get mu4e working on Windows platform? (My Emacs is functioning properly on Windows). (Ik zou dat namelijk graag willen hebben)