Re: Send-hook is Lazy

2002-01-08 Thread Franco Vite

[lun 07/01/2002, ore 12:56] = David Champion scrive:

 [...]

 Have you changed your value of $alternates? If the sender's name matches
 $alternates, and your $index_format has %F in that slot, it will
 expand to the recipient's name instead of to your name.
 
 Yes, I see it.

 Now I use %n and the browser is like I want.

 set index_format=%4C %Z %{%d %b} [%-15.15n] %4c %s

 Tnx :)

-- 
Franco
Quello che abbiamo e' quello che ci siamo presi, e quello che ci siamo 
 presi e' solo una piccola parte di quello di cui abbiamo bisogno
   Assalti Frontali



Re: Send-hook is Lazy

2002-01-07 Thread Franco Vite

[sab 05/01/2002, ore 12:57] = Aaron Schrab scrive:

 At 11:33 +0100 05 Jan 2002, Franco Vite [EMAIL PROTECTED] wrote:
   But: if I want to put the right signature when I replay (epmovi with
   .signature.epmovi, default From with .signature and so on [I've many
   accounts...]), how I can do?
 
 You can have send-hooks that match on the address that the message will
 appear to be from:
 
   send-hook . set signature=~/.signature
   send-hook '~f epmovi' 'set signature=~/.signature.epmovi'
 
 Now I've a little problem:

 before my browser was

 1 r L 29 dic [MaX] 0,3K Archivi ML PPC?
 2   F 30 dic [Franco Vite] 0,8K   

 Now is

 1 r L 29 dic [MaX] 0,3K Archivi ML PPC?
 2   F 30 dic [To Linuxppc Use] 0,8K   

 Why?

 PS
 Linuxppc User is the name of mailing list

-- 
Franco
Quello che abbiamo e' quello che ci siamo presi, e quello che ci siamo 
 presi e' solo una piccola parte di quello di cui abbiamo bisogno
   Assalti Frontali



Re: Send-hook is Lazy

2002-01-07 Thread David Champion

On 2002.01.07, in 20020107113541.GA629@shanti,
Franco Vite [EMAIL PROTECTED] wrote:
  before my browser was
 
  1 r L 29 dic [MaX] 0,3K Archivi ML PPC?
  2   F 30 dic [Franco Vite] 0,8K   
 
  Now is
 
  1 r L 29 dic [MaX] 0,3K Archivi ML PPC?
  2   F 30 dic [To Linuxppc Use] 0,8K   
 
  Why?
 
  PS
  Linuxppc User is the name of mailing list

Have you changed your value of $alternates? If the sender's name matches
$alternates, and your $index_format has %F in that slot, it will
expand to the recipient's name instead of to your name.

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago



Re: Send-hook is Lazy

2002-01-05 Thread Franco Vite

[ven 04/01/2002, ore 18:28] = Aaron Schrab scrive:

 First, you'll need to change that default (first) send-hook to remove
 any previously applied From: header.  You can instead use the $from
 variable to set your default address:
 
 send-hook . unmy_hdr From
 set from=Franco Vite [EMAIL PROTECTED]
 
 Then if you tell mutt what adresses belong to you (with an appropriate
 regexp for $alternates) and set $reverse_name, mutt will automatically
 use the address to which a message was sent when you do a reply:
 
 set alternates='(franco@firenze\.linux\.it|epmovi@tin\.it)'
 set reverse_name
 
 Yep!, it work :-))

 But: if I want to put the right signature when I replay (epmovi with
 .signature.epmovi, default From with .signature and so on [I've many
 accounts...]), how I can do?

 Because now when I replay, From is right, but the signature is the same
 for all accunts, and I change it manualy.

 Ciao :)

-- 
Franco
Quello che abbiamo e' quello che ci siamo presi, e quello che ci siamo 
 presi e' solo una piccola parte di quello di cui abbiamo bisogno
   Assalti Frontali



Re: Send-hook is Lazy

2002-01-05 Thread Aaron Schrab

At 11:33 +0100 05 Jan 2002, Franco Vite [EMAIL PROTECTED] wrote:
  But: if I want to put the right signature when I replay (epmovi with
  .signature.epmovi, default From with .signature and so on [I've many
  accounts...]), how I can do?

You can have send-hooks that match on the address that the message will
appear to be from:

  send-hook . set signature=~/.signature
  send-hook '~f epmovi' 'set signature=~/.signature.epmovi'

The second of those should be after any send-hooks that set the From:
address.  Also, if you like, you should be able to remove the setting of
the signature from the two send-hooks you posted earlier since this
should handle that case as well.  It's not necessary, but it's a bit
cleaner to have that set in only one place.

-- 
Aaron Schrab [EMAIL PROTECTED]  http://www.execpc.com/~aarons/
 Everyone can be taught to sculpt: Michelangelo would have had to be
 taught how _not_ to.  So it is with the great programmers.



Re: Send-hook is Lazy

2002-01-05 Thread Franco Vite

[sab 05/01/2002, ore 12:57] = Aaron Schrab scrive:

 At 11:33 +0100 05 Jan 2002, Franco Vite [EMAIL PROTECTED] wrote:
   But: if I want to put the right signature when I replay (epmovi with
   .signature.epmovi, default From with .signature and so on [I've many
   accounts...]), how I can do?
 
 You can have send-hooks that match on the address that the message will
 appear to be from:
 
   send-hook . set signature=~/.signature
   send-hook '~f epmovi' 'set signature=~/.signature.epmovi'
   ~~

Yep!, this is the way!!

It work fine, you are fantastic :)

Ciao

-- 
Franco
Quello che abbiamo e' quello che ci siamo presi, e quello che ci siamo 
 presi e' solo una piccola parte di quello di cui abbiamo bisogno
   Assalti Frontali



Re: Send-hook is Lazy

2002-01-04 Thread Franco Vite

[mer 02/01/2002, ore 15:57] = Thorsten Haude scrive:

 Hi,
 
 Hi,
 
 [...]

 in my .muttrc I've:

 send-hook . \
 set signature=~/.signature
 
 send-hook . \
 my_hdr From: Franco Vite [EMAIL PROTECTED]
 
 send-hook [EMAIL PROTECTED] \
 'my_hdr From: Franco Vite [EMAIL PROTECTED]; \
  set signature=~/.signature.epmovi

 send-hook '~t ^[EMAIL PROTECTED]$' \
 'my_hdr From: Franco Vite [EMAIL PROTECTED]; \
  set signature=~/.signature.epmovi

 So, if I post a mail or if I replay to a post about it_li.org ML, my
 From is epmovi; but default is firenze.linux.it . And so on.

 I've a question:
 it work fine, but if someone post a mail to epmovi (my secondary
 address), when I replay work the default my_hdr.
 How I can to automaticaly replay with epmovi (out of an ML
 scenario)?

 PS
 I split my incoming mail with procmail, in many (many) folder.
 The other gone to the default mbox (set mbox=~/posta/mbox).
 
 PS2
 Sorry for my terrible! english, and... happy new year :)

-- 
Franco
Quello che abbiamo e' quello che ci siamo presi, e quello che ci siamo 
 presi e' solo una piccola parte di quello di cui abbiamo bisogno
   Assalti Frontali



Re: Send-hook is Lazy

2002-01-04 Thread Aaron Schrab

At 15:19 +0100 04 Jan 2002, Franco Vite [EMAIL PROTECTED] wrote:
  send-hook . \
  my_hdr From: Franco Vite [EMAIL PROTECTED]
  
  send-hook [EMAIL PROTECTED] \
  'my_hdr From: Franco Vite [EMAIL PROTECTED]; \
 set signature=~/.signature.epmovi

  I've a question:
  it work fine, but if someone post a mail to epmovi (my secondary
  address), when I replay work the default my_hdr.
  How I can to automaticaly replay with epmovi (out of an ML
  scenario)?

First, you'll need to change that default (first) send-hook to remove
any previously applied From: header.  You can instead use the $from
variable to set your default address:

send-hook . unmy_hdr From
set from=Franco Vite [EMAIL PROTECTED]

Then if you tell mutt what adresses belong to you (with an appropriate
regexp for $alternates) and set $reverse_name, mutt will automatically
use the address to which a message was sent when you do a reply:

set alternates='(franco@firenze\.linux\.it|epmovi@tin\.it)'
set reverse_name

-- 
Aaron Schrab [EMAIL PROTECTED]  http://www.execpc.com/~aarons/
 The only difference between a car salesman and a computer salesman is
 that the car salesman knows he's lying.



Re: Send-hook is Lazy

2002-01-03 Thread Michael Tatge

Thorsten Haude muttered:
 I have this line in my mutt.rc
   send-hook '~t [EMAIL PROTECTED]' 'set [EMAIL PROTECTED]'
 
 However, this hook seems to catch too late, i.e. I see the result of
 every hook of this kind only in the mail *after* the one the hook is
 made for.

That's  because $from is changed just at the time to send the mail out.
And that is what send-hook is all about isn't it?
$from had the old value when you composed it. The next mail you send
honers the new $from setting.

set realname=Thorsten Haude
set from=[EMAIL PROTECTED]
set use_from 
set envelope_from

send-hook . 'unmy_hdr From:'
send-hook '~t [EMAIL PROTECTED]' 'my_hdr From: Thorsten Haude [EMAIL PROTECTED]'

The above should do what you want.

HTH,

Michael
-- 

PGP-Key: http://www-stud.ims.uni-stuttgart.de/~tatgeml/public.key



Re: Send-hook is Lazy

2002-01-03 Thread David T-G

Thorsten --

...and then Thorsten Haude said...
% 
% Hi,

Hello!


% 
% * David T-G [EMAIL PROTECTED] [02-01-02 16:16]:
% % I have set up my mailing lists to different addresses. To make it
% % easier to write mails, I have this line in my mutt.rc, and similar
% % lines for other mailing lists:
% % send-hook '~t [EMAIL PROTECTED]' 'set [EMAIL PROTECTED]'
% Makes sense.
% Yes, especially considering that I forgot to change it even in this
% very mail the first time.

*grin*  It is, indeed, easy to do.


% 
% % For example, this mail (the first I write with this instance of Mutt)
% % will have my local user@hostname (despite the
% % send-hook . 'set [EMAIL PROTECTED]'
% % in my mutt.rc), the next mail will have [EMAIL PROTECTED] preset.
% A ha!
% Uh? Something wrong here?

Not wrong, but different.


% 
% Perhaps the difference is that I use my_hdr instead of $from.
% Maybe, but before I try that, I would like to hear an explanation why
% the $from solution doesn't work.

I trust that Michael's answer suffices.  I'm not entirely sure I believe
it, since I should think that a my_hdr command would have the same
precedence as a set command but he argues that they're changed at
different times, but it's farther than I've gone into the matter :-)


% 
%   send-hook .unmy_hdr From:
%   send-hook .my_hdr From: [EMAIL PROTECTED] (David T-G)
% 
% It might, I suppose, also be the leading unmy_hdr call...
% That shouldn't really change things. Do you see a difference if you
% leave it out?

I haven't tried it.  I set it up this way originally because I tend to be
compulsive like that.


% 
% Thorsten
% -- 
% Omnis enim res, quae quando non deficit, dum habetur
% et non datur, nondum habetur, quomodo habenda est.
%   - Aurelius Augustinus


HTH  HAND  Happy New Year to all

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg22154/pgp0.pgp
Description: PGP signature


Re: Send-hook is Lazy

2002-01-03 Thread Thorsten Haude

Hi,

* Michael Tatge [EMAIL PROTECTED] [02-01-03 09:35]:
Thorsten Haude muttered:
 I have this line in my mutt.rc
  send-hook '~t [EMAIL PROTECTED]' 'set [EMAIL PROTECTED]'
 
 However, this hook seems to catch too late, i.e. I see the result of
 every hook of this kind only in the mail *after* the one the hook is
 made for.
That's  because $from is changed just at the time to send the mail out.
And that is what send-hook is all about isn't it?
Well, it could mean /before/ sending it or /after/ sending it. I even
wonder why I never noticed one of the send-hooks hooking. Must be
working perfectly.

$from had the old value when you composed it. The next mail you send
honers the new $from setting.
Whatever, I see now where the problem is and will switch to my_hdrs.

Thanks!

Thorsten
-- 
Nobody will ever need more than 640 kB RAM. -- Bill Gates, 1983
Windows XP requires 64 MB RAM.  -- Bill Gates, 2001
Nobody will ever need Windows XP.   -- logical conclusion



Re: Send-hook is Lazy

2002-01-03 Thread Thorsten Haude

Hi,

* David T-G [EMAIL PROTECTED] [02-01-03 11:25]:
% Perhaps the difference is that I use my_hdr instead of $from.
% Maybe, but before I try that, I would like to hear an explanation why
% the $from solution doesn't work.
I trust that Michael's answer suffices.  I'm not entirely sure I believe
it, since I should think that a my_hdr command would have the same
precedence as a set command but he argues that they're changed at
different times, but it's farther than I've gone into the matter :-)
Wait... what was I thinking. You're right, I don't even touch the
send-hook part, I only change the command.

Well done, David, now I'm back to step one, $from-wise. Why is 'set
from=' different from 'my_hdr From: '?

Thorsten
-- 
Das Briefgeheimnis sowie das Post- und Fernmeldegeheimnis sind unverletzlich.
- Grundgesetz, Artikel 10, Abs. 1 



Re: Send-hook is Lazy

2002-01-03 Thread David Champion

On 2002.01.03, in [EMAIL PROTECTED],
Thorsten Haude [EMAIL PROTECTED] wrote:
 
 Well done, David, now I'm back to step one, $from-wise. Why is 'set
 from=' different from 'my_hdr From: '?

$from was introduced in pre-1.0 times to work around problems with hooks
and my_hdr. Something about setting my_hdr From: in hooks and being
able to use $reverse_name properly. Once I understood it all, but these
days I have to check the ChangeLog and trust in whatever it says. That's
progress! :)

Tue Jul 20 20:09:13 1999  Thomas Roessler  [EMAIL PROTECTED]

* init.h, send.c, alias.c, globals.h, init.c:
As Aaron Schrab noted, patch-0.95.6.tlr.reverse_name.1 broke the use
of my_hdr from send-hooks.  This patch introduces a new variable
$from which can be used to use a default sender address; to make
this possible, a new variable class DT_ADDR is defined.

We now have the following algorithm for determining the from
address:

- $from is used as the default from address, if defined.  Otherwise,
  the local user name and (if the user wishes so) the local domain
  are used.
- This address can be overridden by $reverse_name, if set.
- Now, send-hooks are evaluated.
- Afterwards, user headers are evaluated.  In this step, the from
  header can be overridden using my_hdr From:.
- When there is no real name, $realname is used for it.  Note that,
  when the default from header is used and $from defines a real
  name, it takes precedence over $realname.

A later change makes $from's value default to the value of the EMAIL
environment variable. This modifies the first step of this algorithm.

-- 
 -D.[EMAIL PROTECTED]NSITUniversity of Chicago



Re: Send-hook is Lazy

2002-01-03 Thread Michael Tatge

Thorsten Haude muttered:
 Well done, David, now I'm back to step one, $from-wise. Why is 'set
 from=' different from 'my_hdr From: '?

6.3.53.  from

Type: e-mail address
Default: 

When set, this variable contains a default from address.  It can be
overridden using my_hdr (including from send-hooks) and
$reverse_name.

HTH,

Michael
-- 

PGP-Key: http://www-stud.ims.uni-stuttgart.de/~tatgeml/public.key



Re: Send-hook is Lazy

2002-01-03 Thread Thorsten Haude

Moin,

* David Champion [EMAIL PROTECTED] [02-01-03 17:29]:
- $from is used as the default from address, if defined.  Otherwise,
  the local user name and (if the user wishes so) the local domain
  are used.
[...]
- Now, send-hooks are evaluated.
Thanks, that is the answer, of course. I can now sleep better.

Thanks, all of you!

Thorsten
-- 
Alles ist richtig, auch das Gegenteil.
- Kurt Tucholsky



Re: Send-hook is Lazy

2002-01-02 Thread David T-G

Thorsten --

...and then Thorsten Haude said...
% 
% Hi,

Hello!


% 
% I have set up my mailing lists to different addresses. To make it
% easier to write mails, I have this line in my mutt.rc, and similar
% lines for other mailing lists:
% send-hook '~t [EMAIL PROTECTED]' 'set [EMAIL PROTECTED]'

Makes sense.


% 
% However, this hook seems to catch too late, i.e. I see the result of
% every hook of this kind only in the mail *after* the one the hook is
% made for.
% For example, this mail (the first I write with this instance of Mutt)
% will have my local user@hostname (despite the
% send-hook . 'set [EMAIL PROTECTED]'
% in my mutt.rc), the next mail will have [EMAIL PROTECTED] preset.

A ha!


% 
% So what is the thing I don't understand here?
% 
% I don't ususally edit-header.

Perhaps the difference is that I use my_hdr instead of $from.  From my
muttrc file:

  send-hook .   unmy_hdr From:
  send-hook .   my_hdr From: [EMAIL PROTECTED] (David T-G)
  send-hook (spamcop|(submit|quick).[a-z0-9]*)@.*spamcop.net'unset pgp_autosign ; 
set editor=/bin/true signature= ; my_hdr Fcc: /dev/null ; my_hdr From: 
[EMAIL PROTECTED]'
  send-hook supremegall my_hdr From: [EMAIL PROTECTED] (David T-G)
  send-hook muttmy_hdr From: [EMAIL PROTECTED] (David T-G)
  send-hook remind  my_hdr From: [EMAIL PROTECTED] (David T-G)
  send-hook vim my_hdr From: [EMAIL PROTECTED] (David T-G)
  send-hook win4lin my_hdr From: [EMAIL PROTECTED] (David T-G)
  send-hook secureshell my_hdr From: [EMAIL PROTECTED] (David T-G)

It might, I suppose, also be the leading unmy_hdr call...


% 
% Thorsten
% -- 
% Freedom to be an idiot is part of freedom in general.


HTH  HAND  Happy New Year to all

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg22115/pgp0.pgp
Description: PGP signature


Re: Send-hook is Lazy

2002-01-02 Thread Thorsten Haude

Hi,

* David T-G [EMAIL PROTECTED] [02-01-02 16:16]:
% I have set up my mailing lists to different addresses. To make it
% easier to write mails, I have this line in my mutt.rc, and similar
% lines for other mailing lists:
% send-hook '~t [EMAIL PROTECTED]' 'set [EMAIL PROTECTED]'
Makes sense.
Yes, especially considering that I forgot to change it even in this
very mail the first time.

% For example, this mail (the first I write with this instance of Mutt)
% will have my local user@hostname (despite the
% send-hook . 'set [EMAIL PROTECTED]'
% in my mutt.rc), the next mail will have [EMAIL PROTECTED] preset.
A ha!
Uh? Something wrong here?

Perhaps the difference is that I use my_hdr instead of $from.
Maybe, but before I try that, I would like to hear an explanation why
the $from solution doesn't work.

  send-hook .  unmy_hdr From:
  send-hook .  my_hdr From: [EMAIL PROTECTED] (David T-G)

It might, I suppose, also be the leading unmy_hdr call...
That shouldn't really change things. Do you see a difference if you
leave it out?

Thorsten
-- 
Omnis enim res, quae quando non deficit, dum habetur
et non datur, nondum habetur, quomodo habenda est.
- Aurelius Augustinus