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<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 ''"$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:

  •<message-id> (for KernelTrap mailing list archives)
  • (mostly Subversion-related mailing lists)

Deixe uma resposta

O seu endereço de email não será publicado Campos obrigatórios são marcados *

Você pode usar estas tags e atributos de HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>