Re: extract header from current message (to pass to shell)?
- To: mutt-users@xxxxxxxx
- Subject: Re: extract header from current message (to pass to shell)?
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Tue, 26 Aug 2008 12:52:50 -0500
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=IoIRZ8VTk9ZLn5dicmZlIHHiMcA=; b=JO/P SS+3NjQN/3NGkvhcpHJhbwcDC55iUJRqr6br1bqg23hmudJlV0hPcUFU6IfTndG3 a2eygf656+zpVViB22qqXbf81dl79ByhSzA5NXX8LHfTygmL2DzZDak9WgVseRZy lzsHbA75xXXJ1f2pO3mVWdndSI3PBTx9B+8EQy4=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=EbUXnxYCeL0JtDaEottRlp6qz83K9VskxdCbB8FDoxLmTv+YMNsJRG1VMMXXU7PkVYa2cEsBGtR24wYiTR6kRQvOzyAli62wNqIK8saGN+sS0v5F4p+aPt7R/iu7rVOw8KPhSp1TCi0Ll/Bxe4ZZ3Io5RV62bg/KZQI5RAz/PfE=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <20080826164117.GA10390@xxxxxxxxxxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <20080826164117.GA10390@xxxxxxxxxxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.18 (2008-08-18)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday, August 26 at 05:41 PM, quoth Marianne Promberger:
> Is it possible to extract a specific message header from mutt and pass
> it on to a shell command?
Not really, but there are ways of getting around that.
> maybe by passing the current message to formail
Exactly!
> (but then, what would I write for "the current message" on mutt's
> shell command prompt that comes up when I press "!" ?)
Don't use "!"; use "|".
> I'd like to be able to "ignore" threads that are of no interest to
> me (on mailing lists), and I'm currently thinking about this:
>
> (a) bind a key to delete the current message and also extract the
> message ID and append it to a textfile (this is where I'm stuck)
macro index,pager D '<pipe-message>formail -c -x Message-ID: >
~/.killfile<enter><delete-message>'
> (b) set up a folder hook to delete-pattern messages that are "In reply
> to:" messages with IDs that are in the textfile from (a) (I think I've
> got that part sorted)
A folder-hook? Hmmm...
source "awk '{print \"folder-hook . \\\"<delete-pattern>~h References:
\\\",$1}'|"
Just a thought, anyway. Seems a bit excessive, though. Much easier to
just have your MDA delete those messages, rather than have mutt do it
(that file will get big *fast*).
~Kyle
- --
Where all men think alike, no one thinks very much.
-- Walter Lippmann
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iEYEARECAAYFAki0QvIACgkQBkIOoMqOI16QQQCg0HITnQKcHgddvCHSGEQ7BiKp
qagAoLOgdIRZjB6bHBAUt7i7wQuD5UhS
=MmoF
-----END PGP SIGNATURE-----