Omen Wild's mutt patches

This page documents my mutt patches.
Add and edit the Expires: header
patch-1.5.6-ow.edit-expires.4 Last modified: Thursday, 05-Feb-2004 13:45:00 PST Last modified: Monday, 04-Feb-2002 11:18:36 PST
This shell script needs to be set as the expires_editor:
set expires_editor = "~/bin/"

This is a patch I wrote a couple years ago to be able to add and edit expires headers. I found this is the only way I can control the size of my inbox. When a thread arrives I decided how long it will be before I deem that information irrelevant, and then set the message to expire after that amount of time. Occasionally I go through my mailbox and delete all threads that have expired.

Note: Gary Johnson wrote a more elaborate shell script that is able to edit expires without the patch to mutt. It is available here.

The messages I sent for announcement to mutt-dev:

A summary:

I always liked the idea of auto-expiring messages, but there was never a way to add an expires header from within mutt. This patch adds a command 'expires', bound to 'E' in the index and the pager. If an expires header already exists in the message then it lets you edit the existing value. The patch leverages the existing edit message code and doesn't actually add the header itself, but rather passes the old message to a external program that adds the header. This seemed like the least invasive method to me.

I have included the shell script I use for adding the header. To use it, set the variable expires_editor to the location of this script. It uses formail and the GNU date command, but a similar script could be written in perl. The nice thing about using the GNU date command is that you can pass it arguments like: 'friday', '2 weeks', '1 month', etc and it returns an RFC-822 date string.

~X has been bound to 'message that will expire in the future'. Ideally I would liked to have used ~e, but that is already taken by sender and I doubt people want to retrain their fingers.

The index display has been tweaked to add a 'e' (will expire, the same meaning as ~X) in the same field that the PGP info is in. The order of precedence, from low to high is 'eSPsKE'. Thus, 'e' is the least important and 'E' is the most important.

Add and edit the Expires: header (internal version)
patch-1.5.1-ow.expires-internal.1 Last modified: Thursday, 29-Aug-2002 08:15:11 PDT

I have started working on a version of the above expires editor that works entirely internally without the need for the external programs. This version is incomplete and does not fully work yet. It can add, edit, and view Expires: headers, but they do not get written to disk. I put out a plea for help on mutt-dev. If anyone has any ideas I would love to hear them.

Multiple Fcc
patch-1.5.4-ow.multiple-fcc.2 Last modified: Thursday, 17-Jul-2003 09:32:13 PDT
UPDATE: this version expects the mailboxes to be separated by a single comma, no space involved.

This was a quick and dirty hack to allow multiple mailboxes to be specified in the Fcc: header. It expects mailboxes to be separated by a comma.

If someone has a cleaner implementation I would love to see it.

Have S/MIME check to see if the message is from me when decrypting
patch-1.5.6-ow.smime_from.1 Last modified: Thursday, 05-Feb-2004 13:24:05 PST

When I started playing with S/MIME support in conjunction with the Sympa mailing list software I discovered that messaged encrypted by me and sent to a mailing list, where they are reencrypted to each recipient, could not be read by me. This patch makes mutt check the sender when trying to decrypt S/MIME messages.

S/MIME encrypt to self option
patch-1.5.19-ow.smime-encrypt-self.1 Last modified: Wednesday, 04-Feb-2009 14:21:07 PST

This patch adds support for encrypting to the key in $smime_default_key in addition the the recipients. This allows you to send encrypted S/MIME email and still read the message you have sent.

Updated Sep 25, 2002 Fixed a major thinko in the design. Changed the option to a quad option.

Updated July, 2009 Updated for mutt 1.5.19. Fixed an error when freeing new_keylist.

Set X title and icon
patch-1.5.6-ow.xtitles.2 Last modified: Sunday, 19-Dec-2004 01:05:14 PST

This is an adaptation of a patch named patch-1.2.xtitles.1 (original author unknown). This patch is used to set the title or icon of the X terminal mutt is run under. I have taken out the code that checked to make sure the TERM was xterm. Instead I source a config file based on my current terminal.

In my muttrc:

source ~/.mutt/muttrc-$TERM
In ~/.mutt/muttrc-{rxvt,xterm}:
# xterm_icon = "M%?n?AIL&ail?"
set xterm_icon = "mutt: %f %?n?N:%n&? %?b?B:%b?"

# xterm_set_titles = no
set xterm_set_titles = yes

# xterm_title = "Mutt with %?m?%m messages&no messages?%?n? [%n NEW]?"
#set xterm_title = "%f:%r (%?V?%L/?%l) %?M?'%V' ?[Total:%?M?%M/?%m%?n? New:%n?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?b? Buf:%b?%?p? Post:%p?] %> (%s)(%P)"
set xterm_title = "mutt: %f%?n? N:%n&?%?b? B:%b?"
The only real drawback to this method is that when I start mutt under a TERM when I don't have a corresponding muttrc-$TERM file I get an error about a missing file.

FIXME: The right fix to this would be to use curses to check to see if the terminal supports the capability of setting the X title and icon.

Contact the webmaster (remove all spaces): mutt . flibble @ mandarb . com

This file last modified Thursday, May 5, 2016.