I think I have the solution:

send-hook '~t .*' 'my_hdr From: Jerome De Greef <[EMAIL PROTECTED]>'
send-hook !'~t .*' 'my_hdr From: Jerome De Greef<[EMAIL PROTECTED]>'

The first hook is used whenever I hit 'r' and there is a 'To:' line
followed by any address.
The second hook is used when I hit 'F' (newsgroup followup). 
It matches any 'To:' line where the address is not anything... thus
matching no 'To:' line at all.
It's maybe a 'dirty trick' but it does it ;)

Jerome

* Andre Berger ([EMAIL PROTECTED]) wrote:
> * Jerome De Greef <[EMAIL PROTECTED]>, 2002-03-14 13:14 -0500:
> > * Andre Berger ([EMAIL PROTECTED]) wrote:
> > > * Jerome De Greef <[EMAIL PROTECTED]>, 2002-03-14 09:13 -0500:
> > > > Hi,
> > > > 
> > > > I use the nntp patch from vvv.
> > > > I have folder hooks to change my email for the newsgroups to avoid spam.
> > > > When i press F to write a follow-up, my address is changed accordingly.
> > > > Now my question is: is there a way to have my 'normal address' used when
> > > > I hit 'r' to personnaly reply to a newsgroup user ?
> > > > 
> > > > Thanks in advance for any help.
> > > > 
> > > > Jerome
> > > 
> > > Sorry I messed my other posting up.
> > > 
> > > folder-hook nntp "send-hook '~t ^.*$' 'my_hdr From: news'"
> > > folder-hook !nntp "send-hook '~t ^.*$' 'my_hdr From: mail'"
> > 
> > That cannot work as I don't change folders between replying to the
> > newsgroup (hitting 'F') or personnally to a user (hitting 'r').
> 
> Well I tested it once, not enough... When I'm in my mbox "mutt" and
> hit reply, it get "my_hdr mail", when I switch to a newsgroup and hit
> reply, I get  "my_hdr news", as expected. But when I go back to mbox
> "mutt" and hit reply, still "my_hdr news", and I don't see why. Same
> thing when I replace "nntp" above with "."
> 
> > It could have been done using ~h and searching for Newsgroups: in the
> > header but send-hook doesn't allow to use ~h.
> 
> Yeah that would make things really easy.
> 
> > And I cannot use ~t because when you reply to a newsgroup you don't have
> > any To: line in the header...
> 
> When you hit reply via mail, there is a to header ;)
> 
> -Andre
> 



-- 
+-------------------------------------------------------------------+
|               'the panorama of the city is wrong                  |
|               in fact the city seems to be gone!'                 |
|                 the clash, stop the world, 1980                   |
+-------------------------------------------------------------------+

Reply via email to