Matthew Dharm <[EMAIL PROTECTED]> wrote on Thu, 18 May 2000:
> Okay.. I've searched the mailing list archives for this, but it seems that
> I'm the only person trying to do exactly this, and I can't seem to make
> mutt do it. Perhaps some of you out there can help.
Maybe. :-)
> Basically, I want to change my From: header under certain conditions.
Ok, there's three ways to change your From header -- setting $realname
and $from, $reverse_name, and thirdly to use my_hdr From. In a
send-hook, you can only use my_hdr From.
> (1) Replying to a message sent to one of my mail aliases. That is, if
> someone mails me at [EMAIL PROTECTED] and I hit 'reply', I
> want that to be my from address. I can accomplish this with
> reverse_name, but keep reading because this all ties together.
Right.
> (2) I'm _replying_ to mail that was sent to a mailing list. This is the
> tough case -- the To: field is some other random address, and the list
> isn't mentioned in the headers (note that I'm not list-replying or
> group-replying). So far I haven't figured out how to do this.
Do you want to set your From header when you're sending *to* a mailing
list? That can be done with send-hook and the ~l pattern operator.
If not, and you really mean what you say, then this isn't currently
do-able in Mutt.
> I guess what I'm basically looking for is a reply-hook. Something that I
> can use to change things based on the message I'm replying to. Does
> anything like that exist?
Nope, sorry. There's been talk of ways to solve this, and I think even
the best way has been figured out (creating a pseudo-operator which tells
that the next pattern operator should match against the headers of the
replied-to message, not the current message, which could then be used in
send-hooks). It's just that nobody's done it yet.
> Would it be possible to get it added as a
> feature?
Sure, if you write it, or get someone to write it for you. :-)
> With that feature, both problems are pretty trivial, and more
> flexibility is introduced -- reverse_name forces you to use the To: address
> on the message you're replying to (as determined by your alternates
> variable), and it would be nice to be able to hook on that and then
> determine what address to use (possibly another one).
Actually, you can also match against the *From* address in a send-hook
as well. I'm not sure if this helps you at all, but you can use that
to find out when your from address has changed based on $reverse_name.
And I've not tried this, but I think you can also override the From
address from $reverse_name with the use of my_hdr From.
> Also imagine the situation where you're changing e-mail addresses. I'd
> like to have a small blurb attached to the bottom of any reply I send to
> a message that was sent to my old address -- the blurb would give my new
> one. As far as I can tell, this can't be done right now.
Well, if you can figure out the right send-hook for it, it's pretty easy
to do -- just change the contents of $signature for that messages.
> Tho I'd like to be wrong... anyone have any ideas?
I don't think so, but maybe what I wrote helped you.
Mikko
--
// Mikko Hänninen, aka. Wizzu // [EMAIL PROTECTED] // http://www.iki.fi/wiz/
// The Corrs list maintainer // net.freak // DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
Don't take life too seriously, it's only temporary.