With this patch, Mutt has the ability to dynamically restructure threads that are broken either by misconfigured software or bad behaviour from some correspondents. This allows to clean your mailboxes from these annoyances which make it hard to follow a discussion.
Some mailers tend to "forget" to correctly set the In-Reply-To: and References: headers when replying to a message. This results in broken discussions because the recipient software has not enough information to guess the correct threading.
You can fix this by tagging the reply, then moving to the parent message and using the link-threads function (bound to & by default). The reply will then be connected to this "parent" message.
You can also connect multiple childs at once, tagging them and using the tag-prefix command (';') or the auto_tag option.
On mailing lists, some people are in the bad habit of starting a new discussion by hitting "reply" to any message from the list and changing the subject to a totally unrelated one.
You can fix such threads by using the break-thread function (bound by default to #), which will turn the subthread starting from the current message into a whole different thread.
With this patch, if the trash variable is set to a path (unset by default), the deleted mails will be moved to a trash folder instead of being irremediably purged when syncing the mailbox.
will cause every deleted mail to go to this folder.
Note that the append to the trash folder doesn't occur until the resync is done. This allows you to change your mind and undo deletes, and thus the moves to the trash folder are unnecessary.
folder-hook ^imap:// 'unset trash'
Every once in a while, someone asks what are the advantages of this patch over a macro based solution. Here's an attempt to answer this question:
To sum up, it's more integrated and transparent to the user.
This patch adds a new command, my_list, which allows you to create your own (or add to an existing) list of items (single strings or regular expressions). These lists can then be used in ~ patterns, and the following commands: folder-hook, mailboxes, (un)lists and (un)subscribe.
my_list debian_lists firstname.lastname@example.org my_list debian_lists email@example.com my_list oe_users firstname.lastname@example.org email@example.com save-hook '~C %debian_lists' +archives/debian fcc-hook '~t %debian_lists' +sent/debian send-hook . 'unset signature' send-hook '~C %debian_lists' 'set signature=~/.signature_debian' send-hook . 'set pgp_create_traditional=no' send-hook '~t %oe_users' 'set pgp_create_traditional=yes' subscribe %debian_lists
my_list mutt_folders =mutt_users =mutt_dev =mutt_announce my_list debian_folders =debian_user =debian_devel mailboxes =inbox %mutt_folders %debian_folders folder-hook . 'set sort=date' folder-hook %debian_folders 'set sort=score' folder-hook %mutt_folders 'set sort=threads'
If you have a large collection of signatures, you might want to be able to easily find the right quote, the one which suits well what you just wrote in your mail. If so, this patch is for you.
First set the signatures_directory option in your ~/.muttrc to the path where the files containing your signatures are located.
When you call the signatures menu (bound by default to <ESC>s in the compose menu), an index showing the files in this directory appears.
From there, you can use:
When you hit / or <return>, a new menu displays the signatures : you can then select one (possibly at random with r) which will be appended to your mail.
This command allows to test if a feature has been compiled in before actually attempting to configure / use it.
ifdef <item> <command>
where <item> can be the name of a variable or a function.
ifdef imap-fetch-mail 'source ~/.mutt/imap_setup' ifdef trash set trash=~/Mail/trash
This patch adds the purge-message function, which, unlike delete-message, will bypass the trash folder and really delete the mail.
You can bind this function to <esc>D, for instance, by adding the following lines to your muttrc:
bind index \eD purge-message bind pager \eD purge-message
Please be very careful with this function, and try to use it as less as possible. The risk resides in getting into the habit of always using purge-message instead of delete-message, which would really defeat the purpose of having a trash folder feature.
This patch implements the ~= pattern, which matches the duplicated messages. For this to work, you need the following settings:
set sort=threads set duplicate_threads=yes
Similar to the previous patch, this one implements the ~# pattern, which matches the messages where threads are broken. This requires:
set sort=threads unset strict_threads
If you want to bind a key (let's say <esc>#) which will take you to the next broken post, I would suggest these macros:
macro index \e\# "<search>~#<enter>" macro pager \e\# "<exit><search>~#<enter><display-message>"
This patch extends the source command, making it possible to source multiple files at once. For instance,
source ~/.mutt/aliases ~/.mutt/hooks ~/.mutt/colors
One interesting application is that it allows the use of wildcard expansion. Example of use:
source `echo ~/.mutt/*`
to source every file in your ~/.mutt/ directory.
Assuming you've downloaded the patch and the mutt sources in the same directory, just make:
$ gunzip -c mutt-x.y.zi.tar.gz | tar -xvf - (1) $ cd mutt-x.y.z $ patch -p1 < ../patch-x.y.z.name_of_the_patch $ ./configure (2) $ make $ make update-doc (3) $ su -c "make install"
It's that simple!
(1) or simply tar -xvzf mutt-x.y.zi.tar.gz with GNU tar.
(2) ./configure --help for all options. For instance, you may use
$ ./configure --prefix=~/mutt/ --exec-prefix=~/ --sysconfdir=/etc
to install the binaries in ~/bin (then don't forget to add it to your $PATH), the other files in a ~/mutt sub-hierarchy and use the global /etc/Muttrc. Otherwise mutt will be installed in /usr/local.
(3) Optional, but some of these patches include documentation, so you may wish to update your manual.
Some of these patches are already applied by several Linux and BSD vendors. Here's a list for some I'm aware of: