keeping your inbox tidy with mutt

I use mutt for mailing. It is a very powerful commandline email client. What I generally like about programs on the command line is that they usually start up very fast, so you don’t have to keep them running in the background in order to get back to them, but can just start them up when you need them.

In principle, this is also true for mutt. But mutt has the problem that it is not able to load a huge number of maildir messages effectively on startup, as it does not cache the titles and has to read all of the messages to show you the inbox.

This is no problem if you always have an empty inbox.

Having a really empty inbox is no problem with mutt, as it automatically moves read mail to a folder called mbox with the setting set move=yes.
This was not enough for me, as I wanted to keep the read mail of the last two weeks so that it does not move mails that I have already read but that still need processing (like answering..).

So this what I put into ~/.mutttrc to achieve this:

folder-hook =INBOX 'push \
"<tag-pattern>~r>2w~R!~F<enter><tag-prefix-cond><save-essage>=mbox"<enter>'

This moves all messages that are older than 2 weeks, but keeps messages that are flagged and/or unread, when I enter my INBOX.

  1. No comments yet.

  1. No trackbacks yet.