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:
#!/bin/bash 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 "
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)