regex in hook question

2010-12-04 Thread Chip Camden
Hi,

I'd like to create a message_hook based on from address that captures the
from address for use in the hook.  Is that doable?  I'd imagine something
like this:

message-hook ~f(.*) 'set editor=myeditor -f \1'

In this contrived example, I'd like to pass the value of the From:
field as an argument to the editor script when replying, using \1 to
insert the value captured by the first set of parentheses in the regex.
I'm certainly understanding of the implementation challenges with my
imagined syntax, but is there any way to do this?

TIA,

-- 
Sterling (Chip) Camden| sterl...@camdensoftware.com | 2048D/3A978E4F
http://camdensoftware.com | http://chipstips.com| http://chipsquips.com


pgpvpmPrm1Djj.pgp
Description: PGP signature


Re: regex in hook question

2010-12-04 Thread Johannes Weißl
Hello Chip,

On Sat, Dec 04, 2010 at 05:08:38PM -0800, Chip Camden wrote:
 I'd like to create a message_hook based on from address that captures the
 from address for use in the hook.  Is that doable?  I'd imagine something
 like this:
 
 message-hook ~f(.*) 'set editor=myeditor -f \1'

+1

I also want to do this, for hiding the local hostname in the Message-ID:
  send2-hook '~f ^.*@(.*)$' 'set hostname=\1'


Johannes


pgppR2Cw3YGmM.pgp
Description: PGP signature


Re: a folder-hook question

2002-10-02 Thread Isaac Claymore


'folder-hook . XXX' certainly works!

Thanks, folks ;)

Clay

-- 

Isaac Claymore  /\ASCII Ribbon Campaign
Dawning Inc.\ /Respect for open standards
Beijing, China   X No HTML/RTF in email
http://www.dawning.com.cn   / \No M$ Word docs in email



Re: a folder-hook question

2002-10-01 Thread Patrick

* Isaac Claymore [EMAIL PROTECTED] [09-30-02 23:31]:
 
 It seems that folder-hook is executed whenever a folder is entered,
 but is there a 'leave-folder-hook'? I need to reset something back to
 normal upon leaving a folder, after setting it to folder-specific
 value in a folder-hook.
 
 I cant seem to find such a hook, did I missed anything? or is there
 some other trick to do that?

From TFM:

To specify a default command, use the
  pattern `.'':

   folder-hook . set sort=date-sent


Default will match any folder for which you do not have a folder-hook
defined.  Effectively a
'leave-folder-hook-reset-to-normal-folder-hook'.'
-- 
Patrick Shanahan
Registered Linux User #207535 
  @ http://counter.li.org



Re: a folder-hook question

2002-10-01 Thread Gregor Zattler


Hi Isaac,
* Isaac Claymore [EMAIL PROTECTED] [27. Sep. 2002]:
 It seems that folder-hook is executed whenever a folder is entered,
 but is there a 'leave-folder-hook'? 

Notwendig, but there is hope:

 I need to reset something back to normal upon leaving a folder,
 after setting it to folder-specific value in a folder-hook.

folder-hooks are evaluated in the order they appear in the muttrc.
You can use more than only one folder-hook when changing folders.
So you *first* declare a default hook which matches every folder
and produces your normal behavior:

   #by default sort messages according their date of arrival:
   folder-hook . set sort=date-received

and then you declare the specific behavior you want in case you
enter this specific folder:

   # in folder with copys of the emails i wrote sort according date
   folder-hook . set pgp_verify_sig=yes
   # in folders which are in my mailing list directory sort as threads:
   folder-hook +~ml/ set sort=threads

So every time you enter a new folder first of all the default
behavior is established and the specific behaviro only in the
specified case(s).

Ciao, Gregor
-- 
The future is here. It's just not widely distributed yet.
-- William Gibson



a folder-hook question

2002-09-30 Thread Isaac Claymore

Hi, mutters.

It seems that folder-hook is executed whenever a folder is entered,
but is there a 'leave-folder-hook'? I need to reset something back to
normal upon leaving a folder, after setting it to folder-specific
value in a folder-hook.

I cant seem to find such a hook, did I missed anything? or is there
some other trick to do that?

Thanks.

Clay

-- 

Isaac Claymore  /\ASCII Ribbon Campaign
Dawning Inc.\ /Respect for open standards
Beijing, China   X No HTML/RTF in email
http://www.dawning.com.cn   / \No M$ Word docs in email



Re: Hook question - making a point

2002-03-18 Thread Jerome De Greef

* Sven Guckes ([EMAIL PROTECTED]) wrote:
 * Jerome De Greef [EMAIL PROTECTED] [2002-03-16 14:11]:
BTW, doesn't ..* do the same as .+ ?
   it depends.  really - it all depends on
   the language you currently have available.
  I was talking about Mutt ;)
 
 So was I.  more specifically, I was talking about
 the regular expression library used within mutt.
 
send-hook   . 'my_hdr From: JDG [EMAIL PROTECTED]'
send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'
   this should work.  untested, though.
  Just tested it and it doesn't work...
 
 hmm.. the pattern might need quoting:
  send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'
 
 try again.  does it work now?

Nope...

Jerome

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



Re: Hook question - making a point

2002-03-18 Thread Jerome De Greef

Hi,

* Sven Guckes ([EMAIL PROTECTED]) wrote:
 Hi!
 
 * Jerome De Greef [EMAIL PROTECTED] [2002-03-18 08:18]:
   send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'
   try again.  does it work now?
  Nope...
 
   send-hook   ~t . 'my_hdr From: JDG [EMAIL PROTECTED]'
   send-hook ! ~t . 'my_hdr From: JDG [EMAIL PROTECTED]'

Yes, this works. But it's not far from what I had:

send-hook '~t .' 'my_hdr From: JDG [EMAIL PROTECTED]'
send-hook !'~t .' 'my_hdr From: JDG [EMAIL PROTECTED]'

Thanks anyway.

Regards,
Jerome

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



Re: Hook question

2002-03-16 Thread Jerome De Greef

* David T-G ([EMAIL PROTECTED]) wrote:
 Jerome --
 
 ...and then Jerome De Greef said...
 % 
 % I think I have the solution:
 
 Yay!
 
 
 % 
 % send-hook '~t .*' 'my_hdr From: Jerome De Greef [EMAIL PROTECTED]'
 % send-hook !'~t .*' 'my_hdr From: Jerome De Greef[EMAIL PROTECTED]'
 
 Does this work, or do you think it should?  I'd expect that you'd need
 
   ..*
 
 in your patterns instead of just 
 
   .*
 
 'cuz the former is one character plus zero or more characters while the
 latter still accepts none.
 
 Perhaps it works simply because there is a To: header to check versus one
 being absent; in that case, you can probably leave off the asterisk.

It works as is. But you're right, I thought .* was doing what ..* does.
I'm not that good with regular expressions. BTW, doesn't ..* do the same
as .+ ?

Jerome

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



Re: Hook question - making a point

2002-03-16 Thread Sven Guckes

* Jerome De Greef [EMAIL PROTECTED] [2002-03-16 09:25]:
  % send-hook  '~t .*' 'my_hdr From: JDG [EMAIL PROTECTED]'
  % send-hook !'~t .*' 'my_hdr From: JDG [EMAIL PROTECTED]'
  Does this work, or do you think it should?
  I'd expect that you'd need ..* in your
  patterns instead of just .* 'cuz the former is
  one character plus zero or more characters
  while the latter still accepts none.
 
  Perhaps it works simply because there is a To:
  header to check versus one being absent; in that
  case, you can probably leave off the asterisk.

 It works as is. But you're right, I thought .* was
 doing what ..* does.  I'm not that good with regular
 expressions.  BTW, doesn't ..* do the same as .+ ?

it depends.  really - it all depends on
the language you currently have available.

The operator '+' might not be available at all.
But the usual workaround for 1 or more times
of X is to use XX*.

Anyway, if you simply need a default rule for
all addresses then you need to check for just
only  character in the address, right?
Checking for more is simply superfluous.

Also, the pattern in the send-hook command
is applied to the addresses in TO/CC, anyway,
so all you need is to give part of the address:

 send-hook   . 'my_hdr From: JDG [EMAIL PROTECTED]'
 send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'

this should work.  untested, though.

Sven  [who always sends with a replyable address]

-- 
Sven Guckes  [EMAIL PROTECTED]
MUTT SETUP TIPS: http://www.math.fu-berlin.de/~guckes/mutt/setup.html
MUTT HOOKS EXAMPLE:  send-hook .  'set signature=~/.sig.mine'
 send-hook guckes 'set signature='



Re: Hook question - making a point

2002-03-16 Thread Jerome De Greef

* Sven Guckes ([EMAIL PROTECTED]) wrote:
 * Jerome De Greef [EMAIL PROTECTED] [2002-03-16 09:25]:
   % send-hook  '~t .*' 'my_hdr From: JDG [EMAIL PROTECTED]'
   % send-hook !'~t .*' 'my_hdr From: JDG [EMAIL PROTECTED]'
   Does this work, or do you think it should?
   I'd expect that you'd need ..* in your
   patterns instead of just .* 'cuz the former is
   one character plus zero or more characters
   while the latter still accepts none.
  
   Perhaps it works simply because there is a To:
   header to check versus one being absent; in that
   case, you can probably leave off the asterisk.
 
  It works as is. But you're right, I thought .* was
  doing what ..* does.  I'm not that good with regular
  expressions.  BTW, doesn't ..* do the same as .+ ?
 
 it depends.  really - it all depends on
 the language you currently have available.

I was talking about Mutt ;)

 The operator '+' might not be available at all.
 But the usual workaround for 1 or more times
 of X is to use XX*.
 
 Anyway, if you simply need a default rule for
 all addresses then you need to check for just
 only  character in the address, right?
 Checking for more is simply superfluous.

Right...

 Also, the pattern in the send-hook command
 is applied to the addresses in TO/CC, anyway,
 so all you need is to give part of the address:
 
  send-hook   . 'my_hdr From: JDG [EMAIL PROTECTED]'
  send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'
 
 this should work.  untested, though.

Just tested it and it doesn't work...

Jerome

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



Re: Hook question - making a point

2002-03-16 Thread Sven Guckes

* Jerome De Greef [EMAIL PROTECTED] [2002-03-16 14:11]:
   BTW, doesn't ..* do the same as .+ ?
  it depends.  really - it all depends on
  the language you currently have available.
 I was talking about Mutt ;)

So was I.  more specifically, I was talking about
the regular expression library used within mutt.

   send-hook   . 'my_hdr From: JDG [EMAIL PROTECTED]'
   send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'
  this should work.  untested, though.
 Just tested it and it doesn't work...

hmm.. the pattern might need quoting:
 send-hook ! . 'my_hdr From: JDG [EMAIL PROTECTED]'

try again.  does it work now?

Sven



Re: Hook question

2002-03-16 Thread Andre Berger

* Jerome De Greef [EMAIL PROTECTED], 2002-03-15 08:20 -0500:
 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.

I would like to set my Bcc headers on that basis, but it seems to
work randomly only!

send-hook '~t .*' 'my_hdr Bcc: mymail'
send-hook !'~t .*' 'unmy_hdr Bcc'

I would be very happy if anyone could tell me what to do in order to
turn off my Bcc header automatically when posting.

-Andre




msg25620/pgp0.pgp
Description: PGP signature


Re: Hook question - describe your problem!

2002-03-16 Thread Sven Guckes

* Andre Berger [EMAIL PROTECTED] [2002-03-16 18:34]:
 I would like to set my Bcc headers on that basis,
 but it seems to work randomly only!
   send-hook  '~t .*'   'my_hdr Bcc: mymail'
   send-hook !'~t .*' 'unmy_hdr Bcc'
 I would be very happy if anyone could tell me what to do in
 order to turn off my Bcc header automatically when posting.

  send-hook . unmy_hdr *

this should turn off *all* extra headers.
set now set your BCC header as you need.

btw, your first send-hook reads like this:
When TO contains an address of arbitrary
 length then set the following BCC line.
And the length can be ZERO, too!

Get to know your regular expressions!
(And next time start a new thread, ok?)

I think it's time for a workshop
on regex here in Berlin..

Anyway, you did not describe
what the hooks shall do.
And it's a waste of time
trying to guess it.

Sven  [read da book! see sig..]

-- 
Title: Mastering Regular Expressions
Author:Jeffrey Friedl [EMAIL PROTECTED]
Publisher: O'Reilly, 1997, 1-56592-257-3
URL:   http://www.oreilly.com/catalog/regex/



Re: Hook question - describe your problem!

2002-03-16 Thread Andre Berger

* Sven Guckes [EMAIL PROTECTED], 2002-03-16 20:26 -0500:
 * Andre Berger [EMAIL PROTECTED] [2002-03-16 18:34]:
  I would like to set my Bcc headers on that basis,
  but it seems to work randomly only!
send-hook  '~t .*'   'my_hdr Bcc: mymail'
send-hook !'~t .*' 'unmy_hdr Bcc'
  I would be very happy if anyone could tell me what to do in
  order to turn off my Bcc header automatically when posting.
 
   send-hook . unmy_hdr *
 
 this should turn off *all* extra headers.
 set now set your BCC header as you need.
 
 btw, your first send-hook reads like this:
 When TO contains an address of arbitrary
  length then set the following BCC line.
 And the length can be ZERO, too!
 
 Get to know your regular expressions!
 (And next time start a new thread, ok?)
 
 I think it's time for a workshop
 on regex here in Berlin..
 
 Anyway, you did not describe
 what the hooks shall do.
 And it's a waste of time
 trying to guess it.

Sven, thank you very much for your response and your time.

What I'm trying to accomplish is more or less the same Jerome (the
original poster) wants. We use mutt with nntp-patch and want to set
headers according to the fact if we are mailing or posting. Jerome
came up with the solution above which indeed works for From-headers,
but not really (read: consistantly) for Bcc-headers, at least for me.
What I want is to test if there is a To-header or not - if there is
one, I'm mailing, if there is none, I'm posting. If I'm mailing, add
a Bcc header (I'm Bccing all mail to myself to keep track of it). If
not, do not add this header because this results in an ugly To:
undiclosed recipients ; line in my postings.

I've tried an otherwise empty .muttrc file and

send-hook . unmy_hdr *
send-hook '~t ..*' 'my_hdr Bcc: mail'
send-hook !'~t ..*' 'my_hdr Bcc: news'

Testing the settings:

1. (mail) no bcc
2. (mail) bcc: mail
3. (news) bcc: mail
4. (news) bcc: news

So it seems to work, but the send-hook is one message late.

-Andre




msg25625/pgp0.pgp
Description: PGP signature


Re: Hook question

2002-03-15 Thread Jerome De Greef

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   |
+---+



Re: Hook question

2002-03-15 Thread David T-G

Jerome --

...and then Jerome De Greef said...
% 
% I think I have the solution:

Yay!


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

Does this work, or do you think it should?  I'd expect that you'd need

  ..*

in your patterns instead of just 

  .*

'cuz the former is one character plus zero or more characters while the
latter still accepts none.

Perhaps it works simply because there is a To: header to check versus one
being absent; in that case, you can probably leave off the asterisk.


% 
...
% It's maybe a 'dirty trick' but it does it ;)

Those are the best :-)


% 
% Jerome


HTH  HAND

:-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!




msg2/pgp0.pgp
Description: PGP signature


Another auto hook question

2002-03-15 Thread Shawn McMahon

Ok, I've got a send-hook like this:

send-hook ([EMAIL PROTECTED]|[EMAIL PROTECTED]) set pgp_create_traditional


However, it still makes the MIME-type application:pgp.

Is there a way to make it lie and call them text?

Crackmonkey bounces funky MIME-types.




msg25576/pgp0.pgp
Description: PGP signature


Re: Another auto hook question

2002-03-15 Thread Justin R. Miller

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Said Shawn McMahon on Fri, Mar 15, 2002 at 12:38:02PM -0500:

 Ok, I've got a send-hook like this:
 
 send-hook ([EMAIL PROTECTED]|[EMAIL PROTECTED]) set
 pgp_create_traditional
 
 
 However, it still makes the MIME-type application:pgp.
 
 Is there a way to make it lie and call them text?
 
 Crackmonkey bounces funky MIME-types.

You need to either use a macro to pipe to gpg, or you need to try the
Outlook compatibility patch.  I believe that the patch was going to be
rolled into the main distribution?

- -- 
[!] Justin R. Miller [EMAIL PROTECTED]
PGP 0xC9C40C31 -=- http://codesorcery.net

http://www.cnn.com/2002/ALLPOLITICS/01/29/inv.terror.probe/

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8kj+P94d6K8nEDDERAnN4AJwI7OJnDsKovGUzA5WgK9YH3uoAeACeMy9d
ghhYhR36rLYUIRe/HSXLFN8=
=PjLH
-END PGP SIGNATURE-



Re: Another auto hook question

2002-03-15 Thread Shawn McMahon

This one time, at band camp, Justin R. Miller wrote:
 
 You need to either use a macro to pipe to gpg, or you need to try the
 Outlook compatibility patch.  I believe that the patch was going to be
 rolled into the main distribution?

Maybe I'm misunderstanding things, but it seems to me that clear-signed
message is plain text that happens to contain some PGP text, not an
application:pgp-signed message at all, and it is thus broken behavior
for mutt to label it as such.

What am I missing here?




msg25581/pgp0.pgp
Description: PGP signature


Re: Another auto hook question

2002-03-15 Thread David T-G

Shawn --

...and then Shawn McMahon said...
% 
% This one time, at band camp, Justin R. Miller wrote:
%  
%  You need to either use a macro to pipe to gpg, or you need to try the
%  Outlook compatibility patch.  I believe that the patch was going to be
...
% 
% What am I missing here?

Please check the archives for numerous voluminously vehement discussions
regarding PGP-MIME and inline PGP and 7bit and 8bit and QP and LookOut!
and more.  That should catch you up :-)  In particular, look for threads
featuring Shane Wegener or Dale Woolridge; Shane originally wrote the
pgp_outlook_compat patch and then Dale extended it into the form that
has been discussed for inclusion in the stock code.


:-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!




msg25583/pgp0.pgp
Description: PGP signature


Hook question

2002-03-14 Thread Jerome De Greef

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

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



Re: Hook question

2002-03-14 Thread Andre Berger

* 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

folder-hook nntp my_hdr bla1
folder-hook !nntp my_hdr bla2

-Andre




msg25496/pgp0.pgp
Description: PGP signature


Re: Hook question

2002-03-14 Thread Andre Berger

* 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'

-Andre




msg25498/pgp0.pgp
Description: PGP signature


Re: Hook question

2002-03-14 Thread David T-G

Andre, et al --

...and then Andre Berger said...
% 
% folder-hook nntp send-hook '~t ^.*$' 'my_hdr From: news'
% folder-hook !nntp send-hook '~t ^.*$' 'my_hdr From: mail'

Since one doesn't change folders without leaving the folder, you might
say, couldn't the send-hooks be left out and you just set the From:
header when you enter each folder?


% 
% -Andre
% 


HTH  HAND

:-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!




msg25500/pgp0.pgp
Description: PGP signature


Re: Hook question

2002-03-14 Thread Jerome De Greef

* 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').

It could have been done using ~h and searching for Newsgroups: in the
header but send-hook doesn't allow to use ~h.
And I cannot use ~t because when you reply to a newsgroup you don't have
any To: line in the header...

Thanks anyway ;)
Jerome

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



Re: Folder-hook question

2002-02-16 Thread Nicolas Rachinsky

* On Fri, Feb 15, 2002 at 05:40:21PM -0800,
* Gary Johnson [EMAIL PROTECTED] wrote:
 This is what I use:
 
 folder-hook +Incoming/mutt-users 'macro index M :push 
mail^[EMAIL PROTECTED]^M^M mail to list'
   ^^
Can't you just leave this part out?

 Note that I have 'askcc' set, so one of those ^Ms is an answer to the
 Cc:  prompt.

Nicolas



Re: Folder-hook question

2002-02-16 Thread Gary Johnson

On Sat, Feb 16, 2002 at 10:18:10AM +0100, Nicolas Rachinsky wrote:
 * On Fri, Feb 15, 2002 at 05:40:21PM -0800,
 * Gary Johnson [EMAIL PROTECTED] wrote:
  This is what I use:
  
  folder-hook +Incoming/mutt-users 'macro index M :push 
mail^[EMAIL PROTECTED]^M^M mail to list'
^^
 Can't you just leave this part out?

Apparently so.  This seems to work as well:

:macro pager M mail[EMAIL PROTECTED]^M^M

I had thought that an index macro just executed commands in the index
menu and would not be able to enter keystrokes into prompts from the
mail command.  I would have expected at least those last two '^M's in
the second macro to have been executed after the mail command was
completed.  So I guess I don't understand mutt's macro processing as
well as I though I did.

Gary

-- 
Gary Johnson   | Agilent Technologies
[EMAIL PROTECTED]   | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |



Folder-hook question

2002-02-15 Thread Carlos Laviola

Hi, I'm wanting to do something like this guy did (apparently):

http://www.xs4all.nl/~hanb/dot-mutt/folderhooks

And have a rule that makes it so that when I press m while in a certain
folder, the message already has the list (say, [EMAIL PROTECTED]) at
the To: header for me.  Since the method used by Han doesn't seem to
work, I ask you now: do you know if what I'm trying to do is possible?

Thanks,
Carlos.

-- 
Carlos Laviola [EMAIL PROTECTED]



Re: Folder-hook question

2002-02-15 Thread Nicolas Rachinsky

* On Fri, Feb 15, 2002 at 06:12:00PM -0200,
* Carlos Laviola [EMAIL PROTECTED] wrote:
 Hi, I'm wanting to do something like this guy did (apparently):
 
 http://www.xs4all.nl/~hanb/dot-mutt/folderhooks

Sorry I can't look at the website, because I have no
webaccess at the moment.

 And have a rule that makes it so that when I press m while in a certain
 folder, the message already has the list (say, [EMAIL PROTECTED]) at
 the To: header for me.  Since the method used by Han doesn't seem to
 work, I ask you now: do you know if what I'm trying to do is possible?


folder-hook . bind index m mail
folder-hook dsa macro index m \maildsa\ \Mail verschicken\

There is an tab after the dsa to show me an list of aliases beginning
with dsa, but I think if you replace the tab with an \n it would be
your wanted behaviour.

Nicolas



Re: Folder-hook question

2002-02-15 Thread Knute

On Fri, 15 Feb 2002, Carlos Laviola wrote:

 Hi, I'm wanting to do something like this guy did (apparently):

 http://www.xs4all.nl/~hanb/dot-mutt/folderhooks

 And have a rule that makes it so that when I press m while in a certain
 folder, the message already has the list (say, [EMAIL PROTECTED]) at
 the To: header for me.  Since the method used by Han doesn't seem to
 work, I ask you now: do you know if what I'm trying to do is possible?

folder-hook mutt my_hdr To: [EMAIL PROTECTED]

You do have to hit enter to get it to accept the To: field, but at least
you don't have to type it.  Don't know how to set it up so that it
automagically enters it though.




msg24532/pgp0.pgp
Description: PGP signature


Re: Folder-hook question

2002-02-15 Thread Gary Johnson

On Fri, Feb 15, 2002 at 03:26:32PM -0600, Knute wrote:
 On Fri, 15 Feb 2002, Carlos Laviola wrote:
 
  Hi, I'm wanting to do something like this guy did (apparently):
 
  http://www.xs4all.nl/~hanb/dot-mutt/folderhooks
 
  And have a rule that makes it so that when I press m while in a certain
  folder, the message already has the list (say, [EMAIL PROTECTED]) at
  the To: header for me.  Since the method used by Han doesn't seem to
  work, I ask you now: do you know if what I'm trying to do is possible?
 
 folder-hook mutt my_hdr To: [EMAIL PROTECTED]
 
 You do have to hit enter to get it to accept the To: field, but at least
 you don't have to type it.  Don't know how to set it up so that it
 automagically enters it though.

This is what I use:

folder-hook +Incoming/mutt-users 'macro index M :push 
mail^[EMAIL PROTECTED]^M^M mail to list'

Note that I have 'askcc' set, so one of those ^Ms is an answer to the
Cc:  prompt.

Gary

-- 
Gary Johnson   | Agilent Technologies
[EMAIL PROTECTED]   | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |



Re: Folder-hook question

2002-02-15 Thread Cameron Simpson

On 18:12 15 Feb 2002, Carlos Laviola [EMAIL PROTECTED] wrote:
| And have a rule that makes it so that when I press m while in a certain
| folder, the message already has the list (say, [EMAIL PROTECTED]) at
| the To: header for me.  Since the method used by Han doesn't seem to
| work, I ask you now: do you know if what I'm trying to do is possible?

I'm curious. I just use g (group reply) and it puts the list address
there anyway. If I'm making a fresh thread I either use g and trim
the headers (fresh subject, remove References: and In-Reply-To: stuff)
or outright just mail to mutt-users, pissibly looking it up with ^T
(external query).

Of course, this doesn't answer your folder-hook query, but I'm wondering why
you have to use folder-hook?
-- 
Cameron Simpson, DoD#743[EMAIL PROTECTED]http://www.zip.com.au/~cs/

For reading rec.moto, I use one of those carbon-fiber Logitech mice w/a
little 'No Fear' sticker on it. - Mike Hardcore DoD#5010 [EMAIL PROTECTED]
  Apologies to Primus



Re: save-hook question

2001-01-13 Thread Okan Demirmen - mutt

yes, i have considered prcomail and other such filtering, but i would like the mail to 
stay in my inbox, and when i have read it, i like to hit "s" "enter"...lazy and 
quick...

On Fri, Jan 12, 2001 at 11:00:23PM -0500, John P. Verel wrote:
 On 01/12/01, 10:27:19PM -0500, Okan Demirmen - mutt wrote:
  newbie-type: some patience required, unless stupidity is too obvious...
  
  can a save-hook have a regex in it?...if so, i might be totally clueless...
  
  i am trying to save mail to folders, whose names are based on a mailing 
list...wihtout creating a save-hook for every single mailing list
  
  i get the matching portion ok, but can't seem to get the save folder part...
  
  anyone help??..
  
  thanks,
  okan
 Have you looked at procmail to filter into folders?  Much easier.
 -- 
 John P. Verel
 Norwalk, CT



save-hook question

2001-01-12 Thread Okan Demirmen - mutt

newbie-type: some patience required, unless stupidity is too obvious...

can a save-hook have a regex in it?...if so, i might be totally clueless...

i am trying to save mail to folders, whose names are based on a mailing list...wihtout 
creating a save-hook for every single mailing list

i get the matching portion ok, but can't seem to get the save folder part...

anyone help??..

thanks,
okan




mutt and hook question

2000-10-24 Thread Marco Giardini

I'd like that all the outgoing mail to a certain e.mail address are
saved automatically in a special folder instead of in the outbox
one.
Is it possible? If yes, how?
Thanks for replying


.oesse.
-- 
--
Marco Giardini
TecnoGi spa   Tel. +39 0321 885422
Strada per Gravellona Fax  +39 0321 885333
Borgolavezzaro (NO) http://www.tecnogi.com
Key fingerprint = B5 B4 AA 91 89 50 43 8F  B1 6B C6 8C 34 79 5A 7F




Re: mutt and hook question

2000-10-24 Thread Jack McKinney

Big Brother tells me that Marco Giardini wrote:
 I'd like that all the outgoing mail to a certain e.mail address are
 saved automatically in a special folder instead of in the outbox
 one.
 Is it possible? If yes, how?
 Thanks for replying

fcc-hook [EMAIL PROTECTED] +special-folder

--
"Restore your inalienable human rights.   Jack McKinney
 Vote Libertarian.  http://www.lp.org http://www.lorentz.com
 http://www.harrybrowne2000.org   [EMAIL PROTECTED]
  1024D/D68F2C07 4096g/38AEF076

 PGP signature


Re: Send hook question

2000-10-10 Thread Hal Burgiss

On Tue, Oct 10, 2000 at 12:51:31AM -0400, David T-G wrote:
 Hal --
 
 ...and then Hal Burgiss said...
 % 
 % Yea, it works fine with autoedit off, but I like autoedit too :(
 
 What does autoedit get you that you can't have otherwise?  Do you have
 edit_hdrs set, maybe, and like to play with your headers there?

Yes, I do have it set. But mostly I think the autoedit is a bit easier
(ie I am lazy :), especially when replying. The 'To' and 'Subject'
normally have already been decided in this case. I rarely change To or
Subject on a reply. Now, for a new mail, it makes perfect sense. 
 
 I find that edit_hdrs lets me muck around to my heart's content, but I
 leave autoedit off so that I can specify a To: entry so that hooks work.
 I also have $askbcc and $askcc turned off; I do that in the editor...

Same here. Maybe this just takes some getting used to. I guess I want
my cake and to eat it too as they say.


-- 
Hal B
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
--



Re: Send hook question

2000-10-10 Thread Ulf Erikson

mostly I think the autoedit is a bit easier
 (ie I am lazy :), especially when replying. The 'To' and 'Subject'
 normally have already been decided in this case. I rarely change To or
 Subject on a reply. Now, for a new mail, it makes perfect sense. 

Perhaps you are searching for
  set autoedit = no
  set fast_reply = yes



Re: Send hook question

2000-10-10 Thread Hal Burgiss

On Tue, Oct 10, 2000 at 03:52:49PM +0200, Ulf Erikson wrote:
 mostly I think the autoedit is a bit easier
  (ie I am lazy :), especially when replying. The 'To' and 'Subject'
  normally have already been decided in this case. I rarely change To or
  Subject on a reply. Now, for a new mail, it makes perfect sense. 
 
 Perhaps you are searching for
   set autoedit = no
   set fast_reply = yes

Yes, I am ;) You are a good man Ulf. Thanks. Life is good again.

-- 
Hal B
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
--



Re: Send hook question

2000-10-09 Thread David T-G

Hal --

...and then Hal Burgiss said...
% 
% Yea, it works fine with autoedit off, but I like autoedit too :(

What does autoedit get you that you can't have otherwise?  Do you have
edit_hdrs set, maybe, and like to play with your headers there?

I find that edit_hdrs lets me muck around to my heart's content, but I
leave autoedit off so that I can specify a To: entry so that hooks work.
I also have $askbcc and $askcc turned off; I do that in the editor...


:-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.bigfoot.com/~davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
The "new millennium" starts at the beginning of 2001.  There was no year 0.


 PGP signature


Re: Send hook question

2000-10-06 Thread Michael Tatge

Hal Burgiss muttered:
   do you have 'autoedit' set?
  
  He does. And that's why the send-hooks do not work. So, Hal the solution is
  obvious - give up that autoedit stuff.

 Yea, it works fine with autoedit off, but I like autoedit too :(
 
 You confuse me with your from header for a minute ;) 

Oh, I'm sorry. I just sourced your muttrc for testing and forgot to
resource my own one. :(
I don't have a clue how combine autoedit and send-hooks. Harold says it
is possible so maybe you should start a new muttrc from scratch and
you'll see which line confuses mutt.

P.S. Check your Mail-Followup-To:

HTH,

Michael
-- 
Memory fault -- core...uh...um...core... Oh dammit, I forget!

PGP-fingerprint: DECA E9D2 EBDD 0FE0 0A65  40FA 5967 ACA1 0B57 7C13



Re: Send hook question

2000-10-06 Thread Hal Burgiss

On Fri, Oct 06, 2000 at 07:27:38PM +0200, Michael Tatge wrote:
 Hal Burgiss muttered:

 I don't have a clue how combine autoedit and send-hooks. Harold says
 it is possible so maybe you should start a new muttrc from scratch
 and you'll see which line confuses mutt.

Sounds challenging. Would have to take a few options at a time. If I
did a new one with all the features I like/want in one fell swoop, I
would have the exact same muttrc ;) I'll play with this this weekend.

Also, either I am suffering premature senile dementia, or this was
working not too long ago. Oh well ...
 
 P.S. Check your Mail-Followup-To:

Thanks. Was wondering why I was getting duplicates. You just gotta
love mutt for all the configuration options.

-- 
Hal B
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
--



Re: Send hook question

2000-10-05 Thread Michael Tatge

Hal Burgiss muttered:
 Should the below not work? I could swear it used to ;) Recently even.
 Despite much playing with this, I cannot get the header to handle the
 exceptions.
 
 
 unset use_from

Don't know why you do that, but according to the docs it shouldn't
hurt. It might be worth testing without this line, though.

 send-hook . 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'
 send-hook redhat-list 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'

These _have_ to work. If they don't, I'd suspect that there is
something else disturbing. Just copy / pasted your send-hooks into my
mutt - they work. Please post your whole muttrc.

HTH,

Michael
-- 
The goal of Computer Science is to build something that will last at
least until we've finished building it.

PGP-fingerprint: DECA E9D2 EBDD 0FE0 0A65  40FA 5967 ACA1 0B57 7C13



Re: Send hook question

2000-10-05 Thread Hal Burgiss

On Thu, Oct 05, 2000 at 01:30:40AM -0600, Harold Oga wrote:
 On Wed, Oct 04, 2000 at 11:29:30PM -0400, Hal Burgiss wrote:
 On Wed, Oct 04, 2000 at 06:25:47PM -0600, Harold Oga wrote:
  
  send-hook . 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'
  send-hook '~C redhat-list' 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'
 
 No, sorry, it does not work. Neither does '~t'. ??? 
 Hi,
Hmm, strange.  I just tried it here, and it works fine for me.  Not sure
 why it doesn't work for you.  Just to be clear, what exactly is happening?
 Is the From: always being set to From: Hal Burgiss [EMAIL PROTECTED],
 or is something else happening?

Yes,  Hal Burgiss [EMAIL PROTECTED] is it. Despite many
variations. Unless I am going crazy, this was working fine not too
long ago. I suspect something else upgraded is messing with things.
But I can't think what that would be. Thanks.

-- 
Hal B
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
--



Re: Send hook question

2000-10-05 Thread Hal Burgiss

On Thu, Oct 05, 2000 at 11:45:33AM +0200, Michael Tatge wrote:
 Hal Burgiss muttered:
  Should the below not work? I could swear it used to ;) Recently even.
  Despite much playing with this, I cannot get the header to handle the
  exceptions.
  
  
  unset use_from
 
 Don't know why you do that, but according to the docs it shouldn't
 hurt. It might be worth testing without this line, though.

I'll try that. That came from an example in the original Muttrc when I
first installed a couple of years ago.
 
  send-hook . 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'
  send-hook redhat-list 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'
 
 These _have_ to work. If they don't, I'd suspect that there is
 something else disturbing. Just copy / pasted your send-hooks into my
 mutt - they work. Please post your whole muttrc.

http://feenix.eyep.net/xstuff/muttrc

-- 
Hal B
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
--



Re: Send hook question

2000-10-05 Thread Hal Burgiss

On Thu, Oct 05, 2000 at 11:45:33AM +0200, Michael Tatge wrote:
 Hal Burgiss muttered:
  
  unset use_from
 
 Don't know why you do that, but according to the docs it shouldn't
 hurt. It might be worth testing without this line, though.

Still no go.

-- 
Hal B
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
--



Re: Send hook question

2000-10-05 Thread Peter Jaques

do you have 'autoedit' set? if you do, here's what happens: when you hit
'm' to start a message, there is no recipient specified, so 'from' gets set
to the default value. you have to let mutt prompt for the recipient before
you edit, so that it can set the 'from' header.

peter

On  5 Oct 00,  7:49AM, Hal Burgiss wrote:
 On Thu, Oct 05, 2000 at 11:45:33AM +0200, Michael Tatge wrote:
  Hal Burgiss muttered:
   Should the below not work? I could swear it used to ;) Recently even.
   Despite much playing with this, I cannot get the header to handle the
   exceptions.
   
   
   unset use_from
  
  Don't know why you do that, but according to the docs it shouldn't
  hurt. It might be worth testing without this line, though.
 
 I'll try that. That came from an example in the original Muttrc when I
 first installed a couple of years ago.
  
   send-hook . 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'
   send-hook redhat-list 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'
  
  These _have_ to work. If they don't, I'd suspect that there is
  something else disturbing. Just copy / pasted your send-hooks into my
  mutt - they work. Please post your whole muttrc.
 
 http://feenix.eyep.net/xstuff/muttrc
 
 -- 
 Hal B
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
 --

-- 
Peter Jaques [EMAIL PROTECTED]
http://cs.oberlin.edu/~pjaques
klezmerbalkanturkish clarinet; free foodshelter; books to prisoners




Re: Send hook question

2000-10-05 Thread Mikko Hänninen

Dan Boger [EMAIL PROTECTED] wrote on Thu, 05 Oct 2000:
 FWIW, I've been trying to do something very similar... mutt 1.2.5i
 
 send-hook . 'set [EMAIL PROTECTED]'
 send-hook .*lugnet\.com 'set [EMAIL PROTECTED]'
 
 from what I can tell, the send hook DOES work, only AFTER I actually send
 the mail...  so if I write a mail to [EMAIL PROTECTED], my from is "[EMAIL PROTECTED]",
 but the next mail is from "[EMAIL PROTECTED]"...
 
 what am I missing?

You can't use "set from" to change the current message's From header.
It is *only* used as a default from header value for new messages
(new mails and replies too unless $reverse_name comes into effect).

If you want to set the From header from a send-hook, you must use
"my_hdr From:".


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 /
ST, DS9: FRofA #1: Once you have their money ... never give it back.



Re: Send hook question

2000-10-05 Thread Hal Burgiss

Peter Jaques muttered:

   Please post your whole muttrc.
  http://feenix.eyep.net/xstuff/muttrc
 do you have 'autoedit' set?

He does. And that's why the send-hooks do not work. So, Hal the solution is
obvious - give up that autoedit stuff.

HTH,

Michael
-- 
Our informal mission is to improve the love life of operators worldwide.
-- Peter Behrendt, president of Exabyte

PGP-fingerprint: DECA E9D2 EBDD 0FE0 0A65  40FA 5967 ACA1 0B57 7C13



Re: Send hook question

2000-10-05 Thread Harold Oga

On Thu, Oct 05, 2000 at 08:08:48PM +0200, Hal Burgiss wrote:
Peter Jaques muttered:

   Please post your whole muttrc.
  http://feenix.eyep.net/xstuff/muttrc
 do you have 'autoedit' set?

He does. And that's why the send-hooks do not work. So, Hal the solution is
obvious - give up that autoedit stuff.
Hi,
   No, I don't think autoedit has anything to do with the problem.  I have 
autoedit set in my .muttrc, and the send-hooks that Hal posted work fine for
me.  I don't see anything obviously wrong in Hal's muttrc file either though.

-Harold
-- 
"Life sucks, deal with it!"



Re: Send hook question

2000-10-05 Thread Hal Burgiss

On Thu, Oct 05, 2000 at 08:08:48PM +0200, Hal Burgiss wrote:
 Peter Jaques muttered:
 
Please post your whole muttrc.
   http://feenix.eyep.net/xstuff/muttrc
  do you have 'autoedit' set?
 
 He does. And that's why the send-hooks do not work. So, Hal the solution is
 obvious - give up that autoedit stuff.
 

Yea, it works fine with autoedit off, but I like autoedit too :(

You confuse me with your from header for a minute ;) 

-- 
Hal B
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
--



Send hook question

2000-10-04 Thread Hal Burgiss

Should the below not work? I could swear it used to ;) Recently even.
Despite much playing with this, I cannot get the header to handle the
exceptions.


unset use_from
send-hook . 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'
send-hook redhat-list 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'


Mutt 1.2i (2000-05-09)
Copyright (C) 1996-2000 Michael R. Elkins and others.

System: Linux 2.2.16pre3 [using slang 10202]

Updated RH6.2 from src.rpm.

TIA

-- 
Hal B
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
--



Re: Send hook question

2000-10-04 Thread Harold Oga

On Wed, Oct 04, 2000 at 07:58:13PM -0400, Hal Burgiss wrote:
Should the below not work? I could swear it used to ;) Recently even.
Despite much playing with this, I cannot get the header to handle the
exceptions.


unset use_from
send-hook . 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'
send-hook redhat-list 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'
Hi,
   I think send-hook is expecting a pattern where you have redhat-list.
Does the following work better for you?

send-hook . 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'
send-hook '~C redhat-list' 'my_hdr From: Hal Burgiss [EMAIL PROTECTED]'

-Harold
-- 
"Life sucks, deal with it!"



save-hook question

2000-06-08 Thread Adahma

Would it be possible to setup a save-hook that would open the
browser in a specific subdirectory so that I could easily the right
mailbox?

TIA,
Adahma




Re: save-hook question

2000-06-08 Thread Mikko Hänninen

Adahma [EMAIL PROTECTED] wrote on Thu, 08 Jun 2000:
 Would it be possible to setup a save-hook that would open the
 browser in a specific subdirectory so that I could easily the right
 mailbox?

I just tried this:

  save-hook "~f adahma" +foo

... and created the directory ~/Mail/foo

When I pressed s(save), I got the default prompt =foo, when I pressed
TAB, Mutt appended / to the =foo, and the second TAB took me to the
directory browser in the dir =foo/.

Is this what you're looking for?


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 /
If you don't use punctuation there is no point in what you write



Re: save-hook question

2000-06-08 Thread David T-G

Adahma --

...and then Adahma said...
% Would it be possible to setup a save-hook that would open the
% browser in a specific subdirectory so that I could easily the right
% mailbox?

It sounds like what you want is a macro, but perhaps you might want a
save-hook that changes the directory based on the message.

First, then, the macro.  You could create a macro like

  macro pager ,c "change-folder=/some/dir/tab"

to enter the change-folder command (bound to 'c' by default), enter
ctrl-u to erase the supplied line contents (if any), specify the path to
your desired dir, and even hit a tab to list the contents for you.

Now, if you could predefine the directory somehow, like matching on the
domain name, then you could create a save hook like

  save-hook @domain.com =/domain/%O

to save in your $HOME/Mail/domain dir under mutt's 'O'riginal mailbox
name.


% 
% TIA,
% Adahma


:-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.bigfoot.com/~davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
The "new millennium" starts at the beginning of 2001.  There was no year 0.
Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*


 PGP signature


Re: Save-hook question

2000-02-03 Thread Michael S. Tsirkin

Hello!
You seem to be using the compressed folders patch?
I'll look into it.

Quoting r. Stewart V. Wright ([EMAIL PROTECTED]) "Save-hook question":
 Hi all,
  ...
 As a second question - how can I convince mutt that there is new mail
 in compressed folders?  I have procmail deliver some mail to
 compressed folders.  Then in my .muttrc I have
 
 mailboxes ! +'aip.gz' "+majordomo.gz" +mutt.gz
 
 and none of these seems to allow mutt to determine that there is new
 mail in the compressed file.  Any ideas / suggestions?

-- 
This message content is not part of Intel's views or affairs
Michael S. Tsirkin
   Four things are to be strengthened: Torah,and good deeds,
   prayer and one's good manners (Berachoth)



Re: Save-hook question

2000-02-03 Thread David DeSimone

Stewart V. Wright [EMAIL PROTECTED] wrote:

fcc-save-hook  ~A  +People/%O.gz
 
 However, recently one of my correspondents has had their email name
 changed to all capitals, so now rather than being saved in
People/personx.gz
 mutt wants to create
People/PERSONX.gz

Someone created a patch that will cause the following expanded text to
be lower-cased if you use the "_" prefix.  Like so:

fcc-save-hook   ~A  +People/%_O.gz

However, I cannot recall if this is standard behavior now, or if it
still requires a patch.  The behavior *is* in the version that I'm using
(or at least, it's in the manual), but I am using the development
version of Mutt, 1.1.

-- 
David DeSimone   | "The doctrine of human equality reposes on this:
[EMAIL PROTECTED]   |  that there is no man really clever who has not
Hewlett-Packard  |  found that he is stupid." -- Gilbert K. Chesterson
UX WTEC Engineer |PGP: 5B 47 34 9F 3B 9A B0 0D  AB A6 15 F1 BB BE 8C 44



Save-hook question

2000-02-02 Thread Stewart V. Wright

Hi all,

I have the following hook set in my .muttrc :

   fcc-save-hook~A  +People/%O.gz

Effectively unless I specify it elsewhere my mail gets saved to 
   People/MailName.gz

However, recently one of my correspondents has had their email name
changed to all capitals, so now rather than being saved in
   People/personx.gz
mutt wants to create
   People/PERSONX.gz


Short of using procmail to rewrite all incoming mail addresses to
lower case is there some change I can make in my .muttrc ?



As a second question - how can I convince mutt that there is new mail
in compressed folders?  I have procmail deliver some mail to
compressed folders.  Then in my .muttrc I have

mailboxes ! +'aip.gz' "+majordomo.gz" +mutt.gz

and none of these seems to allow mutt to determine that there is new
mail in the compressed file.  Any ideas / suggestions?



Cheers,

S.

-- 
"Theory!" he said. "Theory!  Damned important, that.  You set a
technician on a problem.  He'll fool around.  Waste lifetimes.
Get nowhere.  Just putter about at random.  A true scientist
works with theory.  Lets math solve his problems."
--  Not Final!  Isaac Asimov

 PGP signature


Re: just another send-hook question

1999-11-12 Thread David DeSimone

Richard P. Groenewegen [EMAIL PROTECTED] wrote:

   send-hook '~t [EMAIL PROTECTED]' 'whatever'
 
 but I'll only want this send-hook to work if [EMAIL PROTECTED] is the only
 recipient.  

Isn't there a pattern modifier "^" that means "only"?

send-hook '^~t [EMAIL PROTECTED]' 'whatever'

That matches only if [EMAIL PROTECTED] is the only recipient on the To: 
header.  Note that the Cc: header is not checked.  If you really meant
"only recipient of the message," you'd want ^~C instead.

-- 
David DeSimone   | "The doctrine of human equality reposes on this:
[EMAIL PROTECTED]   |  that there is no man really clever who has not
Hewlett-Packard  |  found that he is stupid." -- Gilbert K. Chesterson
UX WTEC Engineer |PGP: 5B 47 34 9F 3B 9A B0 0D  AB A6 15 F1 BB BE 8C 44



Re: just another send-hook question

1999-11-12 Thread Byrial Jensen

On Fri, Nov 12, 1999 at 07:10:25 +0100, Richard P. Groenewegen wrote:
 Hi,
 
 Here's something that's either trivial or impossible.  I want
 something like 
 
   send-hook '~t [EMAIL PROTECTED]' 'whatever'
 
 but I'll only want this send-hook to work if [EMAIL PROTECTED] is the only
 recipient.  

See the section in the manual named "Pattern Modifier".

send-hook '^~t [EMAIL PROTECTED]' 'whatever'

 On a related note: how do I limit to all messages send to [EMAIL PROTECTED]
 but nobody else

:l^~C foo@bar\.com

(or to me, but nobody else)?

:l^~p

-- 
Byrial



just another send-hook question

1999-11-11 Thread Richard P. Groenewegen

Hi,

Here's something that's either trivial or impossible.  I want
something like 

send-hook '~t [EMAIL PROTECTED]' 'whatever'

but I'll only want this send-hook to work if [EMAIL PROTECTED] is the only
recipient.  

On a related note: how do I limit to all messages send to [EMAIL PROTECTED]
but nobody else (or to me, but nobody else)?

Richard
-- 
Zout maar niet te zout, dat vinden de mensen lekker.



Re: send-hook question

1999-08-06 Thread Christian Schult

Salvatore Greco wrote:

 I am having a syntax hassle with my send-hooks after and upgrade.
 
 Below is a snippet of some of my send-hooks
 
 -- [send-hooks from .muttrc]
 
 send-hook '~A' 'set signature=~/.signature; my_hdr From: Salvatore Greco 
[EMAIL PROTECTED]; my_hdr Reply-To: [EMAIL PROTECTED]'

I'd suggest using . instead of ~A. The dot specifies a default when
no other pattern matches. ~A means "all mail" and later patterns
will not match.

 send-hook '~t abuse\@lagnet\.org\.za$' 'set signature=~/.sig.lagnet.abuse; my_hdr 
From: LagNet Abuse Team [EMAIL PROTECTED]; my_hdr Reply-To: [EMAIL PROTECTED]'



christian

-- 
No courtesy copy (CC:), please. I'm reading here!



send-hook question

1999-08-05 Thread Salvatore Greco

Good day :)

I am having a syntax hassle with my send-hooks after and upgrade.

Below is a snippet of some of my send-hooks

-- [send-hooks from .muttrc]

send-hook '~A' 'set signature=~/.signature; my_hdr From: Salvatore Greco 
[EMAIL PROTECTED]; my_hdr Reply-To: [EMAIL PROTECTED]'

send-hook '~t abuse\@lagnet\.org\.za$' 'set signature=~/.sig.lagnet.abuse; my_hdr 
From: LagNet Abuse Team [EMAIL PROTECTED]; my_hdr Reply-To: [EMAIL PROTECTED]'

send-hook '~t ^kline@lagnet\.org\.za$' 'set signature=~/.sig.lagnet.kline; my_hdr 
From: LagNet Abuse Team [EMAIL PROTECTED]; my_hdr Reply-To: [EMAIL PROTECTED]'

send-hook '~t skydiver\@lagnet\.org\.za$' 'set signature=~/.sig.lagnet; my_hdr From: 
Skydiver [EMAIL PROTECTED]; my_hdr Reply-To: [EMAIL PROTECTED]'

++ [ send-hooks]

All help would be greatly appreciated !!

--
[EMAIL PROTECTED] | http://salvo.reaper.org | ICQ #8084066



Re: a hook question

1999-07-21 Thread David Ellement

On 990720, at 14:40:58, Robert Chien wrote:
 basically, i want to set signature to .signature.work when sending email
 to people at work, and set signature to just .signature for the rest.
 
 [...] when i send email to co-workers, i can address it as "foo" or
 "foo@west" (notice the unqualified domain name) or "[EMAIL PROTECTED]" or
 "[EMAIL PROTECTED]".

send-hook . "set signature=.signature"
send-hook @(west|(west\.)?sun\.com)$ "set signature=.signature.work"

-- 
David Ellement [EMAIL PROTECTED]



Re: a hook question

1999-07-21 Thread David DeSimone

Robert Chien [EMAIL PROTECTED] wrote:

 basically, i want to set signature to .signature.work when sending email
 to people at work, and set signature to just .signature for the rest.

I do that, too.  Here's my setup:

I want to use "localsig" if the message is one in which ALL of the
recipients are local users, or "remotesig" if the message has any
recipients which are external to my company.

My logic might seem weird, but it's because of the "any recipients"
part.  The send-hook is evaluated for each address in the message to see
if it's true.  So, I set the signature to the "local" signature, then
the next send-hook looks for recipients that are not in my local
organization.  Since that's the majority of where my mail gets sent, the
"remotesig" is usually chosen.

send-hook ~A"set signature=~/.localsig"
send-hook '! ~C "@.*(convex|(convex|rsn)\.hp)\.com$"'   \
"set signature=~/.remotesig"

The expression matches [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED], etc.

Now that I look at it, though, it needs an update on domain names, but
basically it works.  :)

I'm wondering if my backslashes are in the right places, though, or if I
have the right number of them.  Since there are two levels of quotes
used, maybe I should use "\\." for a dot, or "\\\." to get the proper
effect.  Any quote/regexp experts know for sure?  :)

-- 
David DeSimone   | "The doctrine of human equality reposes on this:
[EMAIL PROTECTED]   |  that there is no man really clever who has not
Hewlett-Packard  |  found that he is stupid." -- Gilbert K. Chesterson
Convex Division  |PGP: 5B 47 34 9F 3B 9A B0 0D  AB A6 15 F1 BB BE 8C 44



a hook question

1999-07-20 Thread Robert Chien

hello mutt users,

i need some help with using hook in the following situation:

basically, i want to set signature to .signature.work when sending email
to people at work, and set signature to just .signature for the rest.

i've been playing with different hooks without any success, because it's
more difficult than i first thought. when i send email to co-workers, i
can address it as "foo" or "foo@west" (notice the unqualified domain
name) or "[EMAIL PROTECTED]" or "[EMAIL PROTECTED]". because of this wide
variety, i haven't been able to successfully configure my hooks.

maybe i overlooked something and the answer is really simple, if so,
please point it out to me.

robert



Odd hook question

1999-05-25 Thread Jeffrey Haas

I'm looking to do something resembling the following pseudo-code:

I have some arbitrary field, say sender (~e in mutt)
I want to say:

~e =~ /^(.*)@(.*)$/

if -d $2, then savehook becomes $2/$1.

Suggestions, or time to look at hacking in a feature?
(As soon as I can get autoconf to behave...)

-- 
 Jeffrey Haas   
[EMAIL PROTECTED]  "Normal" is a local phenomenon.