Re: Question about $from and send-hooks

2000-03-26 Thread Aaron Schrab

At 17:22 +0200 24 Mar 2000, Mikko Hänninen [EMAIL PROTECTED] wrote:
 So, should setting $from (and $realname) inside a send-hook actually
 change the from address or not for the current email?  If it doesn't,
 then it can't be used as a full replacement for "my_hdr From:" (and

No, it shouldn't.  $from isn't meant to be a full replacement for
'my_hdr From:', it's meant to let people set the default.

 then we again get the $reverse_name problem).

No, we don't.  The $reverse_name problem was that it wouldn't override a
default set by my_hdr.  The order for this stuff is:

- Apply $from
- Do $reverse_name
- Do send-hooks (including 'my_hdr From:')

If applying $from were to be moved after the send-hooks, then $from
would have exactly the same problems as 'my_hdr From:'.  Unless applying
$reverse name were moved so it was again after that, but then the
address it sets couldn't be matched against in send-hooks, and there
would be no way to override it.  So, if you want to set the From:
address in a send-hook, you should still use 'my_hdr From:'.  That this
overrides $reverse_name is a feature, not a bug.  For instance, I've
occasionally used things like:

send-hook . unmy_hdr From:
send-hook '~f aarons@illiam' my_hdr From: Aaron Schrab [EMAIL PROTECTED]

Because although I want the address [EMAIL PROTECTED] to be
recognized as mine, I never want to use it for sending mail.

-- 
Aaron Schrab [EMAIL PROTECTED]  http://www.execpc.com/~aarons/
 "If that makes any sense to you, you have a big problem."
   -- C. Durance, Computer Science 234



Re: Question about $from and send-hooks

2000-03-26 Thread Mikko Hänninen

Aaron Schrab [EMAIL PROTECTED] wrote on Sat, 25 Mar 2000:
 The order for this stuff is:
 
 - Apply $from
 - Do $reverse_name
 - Do send-hooks (including 'my_hdr From:')

Ok, thanks for the explanation.  I suppose the default send-hook then
should have a "unmy_hdr From:" in order to get rid of the previously
set "my_hdr From:" value and to let $from and $reverse_name do their
thing?  Would this affect "send-hook ~f" parsing, will the ~f pattern?
I guess not if the default hook is first...


Regards,
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 /
"Yesterday was the deadline on all complaints."



Question about $from and send-hooks

2000-03-24 Thread Mikko Hänninen

Hi,

My turn to have a question. :-)  Since I seem to answer questions about
send-hooks, $reverse_name, my_hdr From: etc., I thought I should try to
finally adapt my own .muttrc files to using "set from=" instead of
"my_hdr From:".

I ran into a problem though.  I simply replaced each "my_hdr From:"
command with the appropriate "set from=" and "set realname=" commands.
But doing this doesn't seem to be equal to using "my_hdr From:" -- the
from address does get changed, but the change does not take effect for
the *current* new email.  So in fact, the address gets changed for the
next email, since the send-hook for that message isn't acting on that
email either.

I noticed this because I have a default send-hook that should set my
address to [EMAIL PROTECTED], however one of my emails sent out had
the address as [EMAIL PROTECTED] -- this is a valid address but
one that I never want to use.

So, should setting $from (and $realname) inside a send-hook actually
change the from address or not for the current email?  If it doesn't,
then it can't be used as a full replacement for "my_hdr From:" (and
then we again get the $reverse_name problem).


I'm using Mutt 1.1.9.

Regards,
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 /
*** WANRING -- this signature quote is spellt wrong. ***