Re: folder-hook in my .muttrc doesn't work
- To: mutt-users@xxxxxxxx
- Subject: Re: folder-hook in my .muttrc doesn't work
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Mon, 2 Jun 2008 09:06:13 -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=kqxnlJHRNl3eO8xbV2iHtR9WfrM=; b=UDIa b4FH/ZTKYmAVlc/SFTwfAFi+sIKgvfRicXec8Ay6aXZpk49kf4/o6uGHBLmhhYS1 r7LUOJoMEwvkokaAnx5M8Lj3RLSSItaDUPvfhpomxVtM7oRXLDPg4sXDVT9xaDkv sFYxIieFbYFkHIfLCjP4db16vyMkLl+dBvViImQ=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=VW6JZL5nQssAxmHO4oGTwR/F5ojW3HRmzn66YTwUQQ04EIOdTud+8/a9H33fnqYgSOYvANJHqcJES9Q3tf5JNvGUVZIWbxnPcLY2zJ7jNt+VmPBSycQP/RHXA1JQovVU4A7WsljjjC9wFp+1gy5lZKG5oKWeSwIwgdGjUAAWO6c=; 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: <20080602102905.GA8773@teufel>
- 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: <20080602102905.GA8773@teufel>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.18 (2008-05-22)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday, June 2 at 12:29 PM, quoth Rudolf Bahr:
>folder-hook +fanciulla/lisa 'set use_from=no'
>folder-hook +fanciulla/lisa 'unmy_hdr *'
>folder-hook +fanciulla/lisa 'my_hdr From: thats-me@xxxxxxxxxxxxx'
Those three should work fine.
>folder-hook +fanciulla/lisa 'my_hdr To: lisa@xxxxxxxxxxxxx'
>folder-hook +fanciulla/lisa 'my_hdr Fcc:
>=fanciulla/lisa'
Those two won't do anything (well... they will, but not what you
expect). First of all, every time you compose a message, mutt asks you
who the recipient is. Setting a To: header ahead of time doesn't
change that, so whatever To: header you had set before will get
overwritten. Secondly, the Fcc: setting isn't a *header*, it's a
*setting* (that mutt displays in the compose screen as if it was a
header). Here's how you'd do it the "right" way:
folder-hook +fanciulla/lisa 'set record="=fanciulla/lisa"'
>folder-hook +fanciulla/lisa 'my_hdr Reply-To:
>thats-me@xxxxxxxxxxxxxxxxxxx'
That's another one that mutt often generates at compose-time (just
like the "To:" header) and overwrites any previous settings. For
example, mutt obeys the environment variable REPLYTO.
> Hopelessly, it doesn't work. if I answer to an e-mail in this
> folder, I still allways have to correct some of the header fields.
*answer* email (r), as opposed to compose new email (m)? If you're
*replying* to email (r), then the recipient (To:) is set based on the
message you're replying to.
What exactly are you trying to achieve?
Keep in mind, these hooks are only triggered when you enter the
folder. If you have other hooks that override them (such as send-hooks
or reply-hooks or message-hooks), they will not be re-triggered until
you re-enter the folder.
~Kyle
- --
Suppose ye that I am come to give peace on earth? I tell you, Nay; but
rather division: For henceforth there shall be five in one house
divided, three against two, and two against three. The father shall be
divided against the son, and the son against the father; the mother
against the daughter, and the daughter against the mother; the mother
in law against her daughter in law, and the daughter in law against
her mother in law.
-- Prince of Peace, Jesus Christ (Luke 12:51-53)
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iEYEARECAAYFAkhD/lUACgkQBkIOoMqOI15TMQCgg8KKrpfe1srdiQyPGeBMPk4V
f8QAoNG85Z3RNne7p6Mka1aKXQMVlYnj
=T3JL
-----END PGP SIGNATURE-----