9 Oct 2007 boto   » (Journeyer)

Getting a mailing-list archive URL from a Message-ID

It happens often to me: I am reading a mailing list on mutt and I want to send a pointer to the message to somebody.

I always wanted to be able to press a key on mutt, and a script would query mailing list archives and find a URL for the message on a mailing list archive. Today I have found this to be possible. Gmane has a “Message-Id” URL format tha allows you to do it. Just point to http://mid.gmane.org/<message-id> and it will redirect to the message on the archives, if it is present.

Now, getting a URL for a mailing list message is as simple as piping the message from mutt to this small script:

mid="$(grep -m 1 -i ^Message-ID: | cut -d: -f2 | sed -e 's/^ *//')"
kfmclient openURL 'http://mid.gmane.org/'"$mid"

And this can be bound this to a keystroke under mutt by simply using something like this on .muttrc:

macro pager U "msg2url\n”

There are other mailing list archives with similar features. But they are more specific to some mailing lists, so they are not as comprehensive as Gmane. Some examples:

  • http://kerneltrap.org/mailarchive/message-id/<message-id> (for KernelTrap mailing list archives)
  • http://www.red-bean.com/threadfind (mostly Subversion-related mailing lists)

Syndicated 2007-10-09 15:50:55 from Eduardo Habkost / diary

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!