Re: Preventing send-hooks from overriding reply-hooks

2013-10-21 Thread Michael Elkins

On Mon, Oct 21, 2013 at 12:24:00AM -0400, Matt Rechkemmer wrote:

Lately, I've found myself needing to change my replies' From address and
signature based on which address the original message was sent to.  I
thought reply-hooks would be perfect for this, but I kept getting jammed up
on my default send-hook.  I dug this gem out of the archive from 2002:


However, you can inhibit send-hook's in the reply case by using the
pattern '! ~Q' (not-replied) in the send-hook to tell when reply-hook's
have been executed.


Oh, how I wish this was in the documentation near reply-hooks.

Perhaps it could be added in the future?


Good idea, I just updated the manual with that snippet.

https://dev.mutt.org/trac/changeset/6325/
--
PGP key 4096R/4054DBFA DD1E A7F4 7860 2D5E 7BDE  459E DB99 9B42 4054 DBFA


Preventing send-hooks from overriding reply-hooks

2013-10-20 Thread Matt Rechkemmer
Lately, I've found myself needing to change my replies' From address and
signature based on which address the original message was sent to.  I
thought reply-hooks would be perfect for this, but I kept getting jammed up
on my default send-hook.  I dug this gem out of the archive from 2002:

 However, you can inhibit send-hook's in the reply case by using the
 pattern '! ~Q' (not-replied) in the send-hook to tell when reply-hook's
 have been executed.

Oh, how I wish this was in the documentation near reply-hooks.

Perhaps it could be added in the future?

Cheers,

--
Matt Rechkemmer
mutt-l...@aesir-corporation.com


Re: priority of send-hooks and folder-hooks

2011-05-17 Thread Michael Elkins

On Mon, May 16, 2011 at 09:53:34AM +0200, Thorsten Scherf wrote:

I did some signature configuration based on folder-hooks and send-hooks.
As default send-hook, I've choosen a specific signature that changes
based on different recipient addresses. I now want to change the
signature also based on specific holders, but it looks like the config I
did for send-hooks has preference over the folder-hook config. Is there
any way to change this behaviour?


Can you elaborate more specifically on what you want to accomplish?
It's unclear to me if you are attemping to set a specific signature per
folder that overrides your default recipient send-hooks.


priority of send-hooks and folder-hooks

2011-05-16 Thread Thorsten Scherf

I did some signature configuration based on folder-hooks and send-hooks.
As default send-hook, I've choosen a specific signature that changes
based on different recipient addresses. I now want to change the
signature also based on specific holders, but it looks like the config I
did for send-hooks has preference over the folder-hook config. Is there
any way to change this behaviour?

Cheers,
Thorsten



smime.p7s
Description: S/MIME cryptographic signature


Chained send-hooks

2008-11-25 Thread Jeremie Le Hen
Hi!

% send-hook . 'unmy_hdr From:'
% send-hook . 'set signature=~/.signature'
% send-hook '~C @domain\.com' 'my_hdr From: [EMAIL PROTECTED]'
% send-hook '~f [EMAIL PROTECTED]' 'set signature=~/.signature-domain'

If the From: address has been changed by the third send-hook, the fourth
one won't match.  However, if the From: address has been changed thanks
to reverse_name, then the fourth send-hook will match.

To sum up, it seems that the address matched with ~f stay the same while
all send-hooks are processed.  Is it the expected behaviour?

Regards,
-- 
Jeremie Le Hen
 jeremie at le-hen dot org  ttz at chchile dot org 


Re: Chained send-hooks

2008-11-25 Thread Michael Elkins
On Tue, Nov 25, 2008 at 05:31:19PM +0100, Jeremie Le Hen wrote:
 To sum up, it seems that the address matched with ~f stay the same while
 all send-hooks are processed.  Is it the expected behaviour?

Yes, this is expected behavior.  You want to change the last send-hook
to send2-hook, which should match on the changed address.

me


Re: send hooks again .. not working

2002-10-15 Thread Rafael C. Gawenda

* Toby Coleridge [EMAIL PROTECTED] [2002-10-11 10:54 (CEST)]

 nope still doesnt work I noticed that I have set from at the
 top of my muttrc is this causing problems for send hooks?

Lookup use_from in the manual. Perhaps you're mixing things up,
where you have to choose only one way (my_hdr)

-- 
Rafael C. Gawenda
 2:346/7.549@fidonet
Registered LiNUX user #93375


Computers are useless. They can only give you answers (Pablo
Picasso)



msg31841/pgp0.pgp
Description: PGP signature


Re: send hooks again .. not working

2002-10-14 Thread Toby Coleridge

On Sat, Oct 12, 2002 at 09:26:19AM -0500, Aaron Schrab wrote:
 At 15:18 +0200 12 Oct 2002, Sven Guckes [EMAIL PROTECTED] wrote:
  * David Champion [EMAIL PROTECTED] [2002-10-12 00:06]:
   I thought that you need to use set from= in send-hooks
   instead of using my_hdr, but I might misremember.
 
 No, it's the other way around.  By the time send-hooks are applied to a
 message $from has already been fetched and it won't be looked at again
 for that message.  my_hdr on the other hand can still override the From:
 header that mutt generates.
 
  yep - the From: as set by reverse_name feature will
  be overridden by all From: lines as set with my_hdr.
  9yet another entry for the faq...)
 
 This is correct, except for the first word.
 
so what would this mean with respect to this sendhook:

I have the following so far:
send-hook . unmy_hdr From: [EMAIL PROTECTED]
send-hook '~C @lboro.ac.uk' 'my_hdr From: me@myuniaddress'

Thanks
Toby.



Re: send hooks again .. not working

2002-10-14 Thread Michael Tatge

Toby Coleridge ([EMAIL PROTECTED]) muttered:
 send-hook . unmy_hdr From: [EMAIL PROTECTED]
 ^^^

Leave that out.

 send-hook '~C @lboro.ac.uk' 'my_hdr From: me@myuniaddress'

That should work.

Michael
-- 
Avoid the Gates of Hell.  Use Linux
(Unknown source)

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



Re: send hooks again .. not working

2002-10-14 Thread Toby Coleridge

On Mon, Oct 14, 2002 at 01:11:17PM +0200, Michael Tatge wrote:
 Toby Coleridge ([EMAIL PROTECTED]) muttered:
  send-hook . unmy_hdr From: [EMAIL PROTECTED]
  ^^^
 
 Leave that out.
 
  send-hook '~C @lboro.ac.uk' 'my_hdr From: me@myuniaddress'
 
 That should work.
 
 Michael
 -- 
 Avoid the Gates of Hell.  Use Linux
 (Unknown source)
 
 PGP-Key: http://www-stud.ims.uni-stuttgart.de/~tatgeml/public.key

Hi Guys,

I have an update the send-hook works when replying to an email sent to me at any 
address, however when I create a new email if the address contains an @lboro then it 
doesnt rewrite the from: field any ideas or is this intended if so how can I work 
round it?

Thanks
Toby.



Re: send hooks again .. not working

2002-10-12 Thread Sven Guckes

* David Champion [EMAIL PROTECTED] [2002-10-12 00:06]:
 * On 2002.10.11, in [EMAIL PROTECTED],
 * Toby Coleridge [EMAIL PROTECTED] wrote:
  send-hook . my_hdr From: [EMAIL PROTECTED]
  send-hook @student\.lboro\.ac\.uk my_hdr From: me@myuniemailadrress
 
  however when I send mail to [EMAIL PROTECTED] I get it from
  [EMAIL PROTECTED] not the send-hook as I believe I should ..
  any ideas?

 I thought that you need to use set from= in send-hooks
 instead of using my_hdr, but I might misremember.

yep - the From: as set by reverse_name feature will
be overridden by all From: lines as set with my_hdr.
9yet another entry for the faq...)

Sven



Re: send hooks again .. not working

2002-10-12 Thread Aaron Schrab

At 15:18 +0200 12 Oct 2002, Sven Guckes [EMAIL PROTECTED] wrote:
 * David Champion [EMAIL PROTECTED] [2002-10-12 00:06]:
  I thought that you need to use set from= in send-hooks
  instead of using my_hdr, but I might misremember.

No, it's the other way around.  By the time send-hooks are applied to a
message $from has already been fetched and it won't be looked at again
for that message.  my_hdr on the other hand can still override the From:
header that mutt generates.

 yep - the From: as set by reverse_name feature will
 be overridden by all From: lines as set with my_hdr.
 9yet another entry for the faq...)

This is correct, except for the first word.

-- 
Aaron Schrab [EMAIL PROTECTED]  http://www.schrab.com/aaron/
 [It is] best to confuse only one issue at a time.  -- KR



Re: send hooks again .. not working

2002-10-12 Thread David Champion

* On 2002.10.11, in [EMAIL PROTECTED],
*   Toby Coleridge [EMAIL PROTECTED] wrote:
 i have the following:
 
 send-hook . my_hdr From: [EMAIL PROTECTED]
 send-hook @student\.lboro\.ac\.uk my_hdr From: me@myuniemailadrress
 
 however when I send mail to [EMAIL PROTECTED] I get it from 
[EMAIL PROTECTED] not the send-hook as I believe I should .. any ideas?

I thought that you need to use set from= in send-hooks instead of
using my_hdr, but I might misremember.

-- 
 -D.We establised a fine coffee. What everybody can say
 Sun Project, APC/UCCO  TASTY! It's fresh, so-mild, with some special coffee's
 University of Chicago  bitter and sourtaste. LET'S HAVE SUCH A COFFEE! NOW!
 [EMAIL PROTECTED]   Please love CAFE MIAMI. Many thanks.



send hooks again .. not working

2002-10-11 Thread Toby Coleridge

i have the following:

send-hook . my_hdr From: [EMAIL PROTECTED]
send-hook @student\.lboro\.ac\.uk my_hdr From: me@myuniemailadrress

however when I send mail to [EMAIL PROTECTED] I get it from [EMAIL PROTECTED] 
not the send-hook as I believe I should .. any ideas?

Thanks
Toby



Re: send hooks again .. not working

2002-10-11 Thread Michael Tatge

Toby Coleridge ([EMAIL PROTECTED]) muttered:
 i have the following:
 
 send-hook . my_hdr From: [EMAIL PROTECTED]
 send-hook @student\.lboro\.ac\.uk my_hdr From: me@myuniemailadrress

send-hook '~C student.lboro.ac.uk' 'my_hdr From: me@myuniemailadrress'

HTH,

Michael
-- 
...Deep Hack Mode--that mysterious and frightening state of
consciousness where Mortal Users fear to tread.
(By Matt Welsh)

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



Re: send hooks again .. not working

2002-10-11 Thread Toby Coleridge

Hi Michael,

nope still doesnt work I noticed that I have set from at the top of my muttrc is this 
causing problems for send hooks?

Thanks
Toby.

On Fri, Oct 11, 2002 at 11:42:44AM +0200, Michael Tatge wrote:
 Toby Coleridge ([EMAIL PROTECTED]) muttered:
  i have the following:
  
  send-hook . my_hdr From: [EMAIL PROTECTED]
  send-hook @student\.lboro\.ac\.uk my_hdr From: me@myuniemailadrress
 
 send-hook '~C student.lboro.ac.uk' 'my_hdr From: me@myuniemailadrress'
 
 HTH,
 
 Michael
 -- 
 ...Deep Hack Mode--that mysterious and frightening state of
 consciousness where Mortal Users fear to tread.
 (By Matt Welsh)
 
 PGP-Key: http://www-stud.ims.uni-stuttgart.de/~tatgeml/public.key



Re: send hooks again .. not working

2002-10-11 Thread Toby Coleridge

No the email address in the compose window is still wrong ... ?

Toby

On Fri, Oct 11, 2002 at 01:10:05PM +0200, René Clerc wrote:
 * Toby Coleridge [EMAIL PROTECTED] [11-10-2002 12:50]:
 
  I do however have this in my sendmail.mc / cf :
  
  define(`confDOMAIN_NAME', `4mationnet.com')dnl
  
  because I am behind a private network and I get lots of 550 returned mail.
  
  would this make a difference?
 
 I don't know, I know nothing of sendmail. However, you should be able
 to verify if your send-hook works by checking the From: entry in the
 compose menu (just before you press 'y' to send the mail). Does that
 show the correct from?
 
 -- 
 René Clerc  - ([EMAIL PROTECTED])
 
 Retteb sif lahd, noces ehttub, but the second half is better.
 -A palindrome





Re: Send Hooks ..

2002-10-11 Thread Sven Guckes

* Toby Coleridge [EMAIL PROTECTED] [2002-10-10 20:25]:
 If I setup two send hooks as follows:
 send-hook .my_hdr From: [EMAIL PROTECTED] ;
 send-hook blah my_hdr From: [EMAIL PROTECTED] ;

what are the semicola for?  delete them.

 am i right in thinking that the second send
 hook will be activated on any To: or Cc:
 (or Bcc?) that contains blah in the address

yes

 does this behave in a reg exp manner?

the first parameter to the
send-hook command is a pattern, eg

  ~t foo
  ~c foo
  ~C foo

rtfm to understand.

 will it match all of the following :
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]

 or does it only match after the @ ?

it's a sub-match which matches anywhere.

ps: set tw=70

Sven



Re: send hooks again .. not working

2002-10-11 Thread Sven Guckes

* Toby Coleridge [EMAIL PROTECTED] [2002-10-11 10:10]:
send-hook '~C student.lboro.ac.uk' 'my_hdr From: me@myuniemailadrress'
   nope still doesnt work I noticed that I have set from at the
   top of my muttrc is this causing problems for send hooks?
  Do you have other send-hooks, defined
  _after_ this one that override this setting?
 Nope no other send hooks defined ..

set envelope_from and do *not* let
the MTA rewrite your from lines, ok?

and if you keep top-posting then
we will simply ignore you...

rewriting the messages so that other users can be
reading them as hints from the archive costs time.
so put your answers *after* the question.  got that?

Sven

-- 
Sven Guckes  [EMAIL PROTECTED]
LEARN TO Please do not quote in full - I keep a mail log.
EDIT YOURInstead, edit your reply to make it easy to read.
MESSAGES Please http://learn.to/edit_messages - thanks!  :-)



Re: send hooks again .. not working

2002-10-11 Thread Toby Coleridge

I do however have this in my sendmail.mc / cf :

define(`confDOMAIN_NAME', `4mationnet.com')dnl

because I am behind a private network and I get lots of 550 returned mail.

would this make a difference?

Thanks
Toby.
On Fri, Oct 11, 2002 at 11:10:11AM +0100, Toby Coleridge wrote:
 Nope no other send hooks defined ..
 
 On Fri, Oct 11, 2002 at 11:59:37AM +0200, René Clerc wrote:
  * Toby Coleridge [EMAIL PROTECTED] [11-10-2002 11:55]:
  
  [Michael]
send-hook '~C student.lboro.ac.uk' 'my_hdr From: me@myuniemailadrress'
  
   nope still doesnt work I noticed that I have set from at the top of
   my muttrc is this causing problems for send hooks?
  
  Do you have other send-hooks, defined _after_ this one that override
  this setting?
  
  -- 
  René Clerc  - ([EMAIL PROTECTED])
  
  Ik ben niet droknen.
  -Rachel Pieterse
 



Re: send hooks again .. not working

2002-10-11 Thread Michael Tatge

Toby Coleridge ([EMAIL PROTECTED]) muttered:
 On Fri, Oct 11, 2002 at 11:42:44AM +0200, Michael Tatge wrote:
  send-hook '~C student.lboro.ac.uk' 'my_hdr From:
  me@myuniemailadrress'

 nope still doesnt work I noticed that I have set from at the top of my
 muttrc is this causing problems for send hooks?

Hm, change the default send-hook to unmy_hdr From?

HTH,

Michael
-- 
Oh, I've seen copies [of Linux Journal] around the terminal room at The
Labs.
(By Dennis Ritchie)

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



Re: send hooks again .. not working

2002-10-11 Thread René Clerc

* Toby Coleridge [EMAIL PROTECTED] [11-10-2002 12:50]:

 I do however have this in my sendmail.mc / cf :
 
 define(`confDOMAIN_NAME', `4mationnet.com')dnl
 
 because I am behind a private network and I get lots of 550 returned mail.
 
 would this make a difference?

I don't know, I know nothing of sendmail. However, you should be able
to verify if your send-hook works by checking the From: entry in the
compose menu (just before you press 'y' to send the mail). Does that
show the correct from?

-- 
René Clerc  - ([EMAIL PROTECTED])

Retteb sif lahd, noces ehttub, but the second half is better.
-A palindrome



msg31734/pgp0.pgp
Description: PGP signature


Re: send hooks again .. not working

2002-10-11 Thread René Clerc

* Toby Coleridge [EMAIL PROTECTED] [11-10-2002 11:55]:

[Michael]
  send-hook '~C student.lboro.ac.uk' 'my_hdr From: me@myuniemailadrress'

 nope still doesnt work I noticed that I have set from at the top of
 my muttrc is this causing problems for send hooks?

Do you have other send-hooks, defined _after_ this one that override
this setting?

-- 
René Clerc  - ([EMAIL PROTECTED])

Ik ben niet droknen.
-Rachel Pieterse



msg31736/pgp0.pgp
Description: PGP signature


Re: send hooks again .. not working

2002-10-11 Thread Toby Coleridge

Nope no other send hooks defined ..

On Fri, Oct 11, 2002 at 11:59:37AM +0200, René Clerc wrote:
 * Toby Coleridge [EMAIL PROTECTED] [11-10-2002 11:55]:
 
 [Michael]
   send-hook '~C student.lboro.ac.uk' 'my_hdr From: me@myuniemailadrress'
 
  nope still doesnt work I noticed that I have set from at the top of
  my muttrc is this causing problems for send hooks?
 
 Do you have other send-hooks, defined _after_ this one that override
 this setting?
 
 -- 
 René Clerc  - ([EMAIL PROTECTED])
 
 Ik ben niet droknen.
 -Rachel Pieterse





Send Hooks ..

2002-10-10 Thread Toby Coleridge

If I setup two send hooks as follows:

send-hook . my_hdr From: [EMAIL PROTECTED] ;
send-hook blah my_hdr From: [EMAIL PROTECTED] ; 

am i right in thinking that the second send hook will be activated on any To: or Cc: 
(or Bcc?) that contains  blah in the address,  does this behave in a reg exp manner?

will it match all of the following :

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

or does it only match after the @ ?

Thanks
Toby



send-hooks (was: Re: Send Hooks ..)

2002-10-10 Thread Jussi Ekholm

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Toby Coleridge [EMAIL PROTECTED] wrote:
 If I setup two send hooks as follows:
 send-hook . my_hdr From: [EMAIL PROTECTED] ;
 send-hook blah my_hdr From: [EMAIL PROTECTED] ; 
 
 am i right in thinking that the second send hook will be activated
 on any To: or Cc: (or Bcc?) that contains  blah in the address, does
 this behave in a reg exp manner?

Yes, you are correct. This is a snippet from sample mutt.rc:

#   send-hook [!]pattern command
# command is executed when sending mail to an address matching
# pattern

So, if the mail you are sending contains blah in it's address,
your From-header is changed to [EMAIL PROTECTED]. By the way, why there's
'spacesemi-colonspace' ( ; ) after the my_hdr command?

 will it match all of the following :
 
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]

AFAIK, this is how it goes.

HTH!

- -- 
Jussi Ekholm [EMAIL PROTECTED] | http://erppimaa.ihku.org/ | 0x1410081E


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE9pebaAtEARxQQCB4RAp7cAJ94az3fHy3JffRXp++3dPzznKyllwCgufM3
NlI1ezOpqx1Fj4WYMPra2R4=
=Je4F
-END PGP SIGNATURE-



Re: Send Hooks ..

2002-10-10 Thread René Clerc

* Toby Coleridge [EMAIL PROTECTED] [10-10-2002 22:27]:

 If I setup two send hooks as follows:
 
 send-hook . my_hdr From: [EMAIL PROTECTED] ;
 send-hook blah my_hdr From: [EMAIL PROTECTED] ; 

What's with the semicolons?

 am i right in thinking that the second send hook will be activated
 on any To: or Cc: (or Bcc?) that contains  blah in the address,
 does this behave in a reg exp manner?

Watch your line length!! (modified this)

 will it match all of the following :
 
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 
 or does it only match after the @ ?

Is this laziness? If I wanted to, it took me less time to verify this
than it must have taken you to post this question. Answer: yes, it
will match all of those addresses, and RTFM 3.17:

pattern is a regular expression matching the desired address

 Thanks
 Toby

You're pretty welcome...

-- 
René Clerc  - ([EMAIL PROTECTED])

Everyone needs belief in something. I believe I'll have another beer.



msg31714/pgp0.pgp
Description: PGP signature


Signature and send-hooks

2002-01-01 Thread Francesco Ciattaglia

hi all,

Until now I have used the program signature (by Ian McDonald) launched
at the startup via .bash_profile for creating a dynamic .signature file
(something like this: signature -q .quotefile -r -t .templatefile)

Obviously in my .muttrc I have put set signature = .signature

Now I want to customize my DYNAMIC signature based upon the recipient.

So it's the time to extend my use of the send-hook... but how

send-hook '~t ^mamma@home\.com' 'set signature = ..'

(Inserting the shell command followed by | doesn't seem to work)

TIA
francesco

PS: happy new euro to all european people :-)

-- 
Linux is | E' assolutamente evidente che l'arte del cinema si ispira
Better ! | alla vita mentre la vita si ispira alla tv. [Woody Allen]  
Try it!  | 
Free and | 
Open | 





Re: send-hooks don't work

2001-10-26 Thread Manuel Hendel

On Thu, Oct 25, 2001 at 05:30:08PM -0600, Rob 'Feztaa' Park wrote:
 On Thu, Oct 25, 2001 at 11:42:56PM +0200, Manuel Hendel (dis)graced my inbox with:
  Hallo,
  
  I'm using mutt 1.3.x. I use send-hooks to define the my_hdr From:,
  my_hdr Organisation: and the signature. If write the muttrc file and
  start mutt, everything works fine, but after a while, mutt gets
  confused and brings wrong Organisation or wron signatures. Where's the
  problem.
  
  muttrc:
  
  set default_hook=~t %s
  
  send-hook . my_hdr From: Manuel Hendel [EMAIL PROTECTED] ;\
  set signature=peq|
  
  send-hook .*@domain\.de$ my_hdr From: x ;\
  my_hdr Organisation: x ;\
  set signature=~/.mutt/world.sig
  
  send-hook .*@domain\.de$ my_hdr From: x ;\
  my_hdr Organisation: x ;\
  set signature=~/.mutt/xxx.sig
  
  Is there anything wrong? I don't think so!
 
 Well, I can see you're not unsetting the Organization header with your
 default send-hook.
 
 This means that if you send something to an address that sets
 Organization, you'll keep that header until something else changes it.
 
 Just add unmy_hdr Organisation (might need a : at the end, not sure)
 to that first send hook, and that should fix that problem.
 
 As for your sig being screwed up, I don't know - it looks fine here.
 Unless peq does nothing...
 
This seems to work. Thank you very much.

Manuel

-- 
On the other hand the early worm gets eaten. 



send-hooks don't work

2001-10-25 Thread Manuel Hendel

Hallo,

I'm using mutt 1.3.x. I use send-hooks to define the my_hdr From:,
my_hdr Organisation: and the signature. If write the muttrc file and
start mutt, everything works fine, but after a while, mutt gets
confused and brings wrong Organisation or wron signatures. Where's the
problem.

muttrc:

set default_hook=~t %s

send-hook . my_hdr From: Manuel Hendel [EMAIL PROTECTED] ;\
set signature=peq|

send-hook .*@domain\.de$ my_hdr From: x ;\
my_hdr Organisation: x ;\
set signature=~/.mutt/world.sig

send-hook .*@domain\.de$ my_hdr From: x ;\
my_hdr Organisation: x ;\
set signature=~/.mutt/xxx.sig

Is there anything wrong? I don't think so!

Thanks in advance.

Manuel

PS Just now, mutt does it right.

-- 
Those who make peaceful revolution impossible will make violen trevolution 
inevitable. 
-John Fitzgerald Kennedy 



send-hooks, autoedit, etc

2001-08-01 Thread Myrddin

I'm using 1.2.5i and have a small dilemma.  I'm trying to expand my send-hooks
a bit so that when I send to a particular address, it'll modify my from:
header.  Ok, no big deal.  send-hook's work just fine for that  IF I'm
either _replying_ to a mail, or if I turn off autoedit.

Yuk.  I want to be able to send a mail, with autoedit on, and have the
send-hook triggered anyway.  Now, when I finish editing the message, a menu
comes up wherein I can set the subject, to, etc... seems mutt should be able
to filter through the send-hooks either while entering that menu immediately
after I finish editing the message, or at the very least, if I choose to set
a To: message in that post-editing menu.

Is there any hope?

Thanks!

- Myrddin




using send hooks from external files

2001-05-28 Thread Andre Bonhote

hi list!

i have some files with e-mail adresses inside for procmail to sort my
mail to different mailboxes. in mutt, i use shortcuts to assign new
addresses to the lists. one list looks like this:

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

now i'd like to add a send-hook to my muttrc which
 - assigns a from-address
 - and a .sig
if i send mail to a person in this file.

i tried something like

source `sed s/^/send-hook / ~/.prcml` ... 

and so on, but this doesn't work ... 

any ideas?

thx a lot!

andré



-- 
The heroic gauntlet is here!



new question about send-hooks

2001-05-20 Thread Louis LeBlanc

Hey all.  Another quick question here.

I have a send-hook set up so that when I send to a closed group, like
mutt, my From: header is munged so that I get the '+folder' portion I
subscribed with.  Basically, this was done so that sendmail can sort
my mail into the appropriate folders.

Anyway, I noticed that when I do a group reply, it works.  But if I am
writing a new message, and address it after the message is composed
(using 't' for the recipient, 's' for the subject, etc) it doesn't
work.  It doesn't work if you put the address in while composing,
either (edit_hdrs is set).

When, exactly are these hooks called?  it seems there must be a
way to make it work on any message, otherwise the send-hooks aren't
much good.  Is it possible that they are only getting called when the
message is initiated rather than when it is sent?  If so, how do I
invoke a new mail message for a specific recipient?

It seems like moving the hook invocation to some point after the final
approval of a message is a project that could go eather way - a total
breeze, or a complete cluster*#!.  It all depends on what the
designer was thinking at the time.

Thanks all.

Lou

-- 
Louis LeBlanc
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
[EMAIL PROTECTED]
http://acadia.ne.mediaone.netԿԬ



problems with send-hooks

2001-05-07 Thread Andre Bonhote

hi list!

i got a simple problem for which i didn't find a solution in the man
pages.

i have four send-hooks defined to change my FROM-address and my sig
according to the recipient. my .muttrc looks like this:

[1] send-hook . my_hdr From: Andre Bonhote [EMAIL PROTECTED]
[2] send-hook ~C foo| ~C bar my_hdr From: AB other.mail@address
[3] send-hook ~f linux.ch `/usr/local/bin/gnarr -1  ~/.signature`
[4] send-hook ~f colt* `cp ~/.signature-serious ~/.signature`

[1] sets my default mail address
[2] sets my address to a different one, if i send mail to foo or bar.
[3] takes the output of gnarr {1} if the mail comes from my default mail
address
[4] takes my serious signature to send mail to foo and bar

ahm, in my opinion, this should work, but it does not. i found something
about the send-hook being processed after getting the initial list of
recipients here {2}, but i guess it should be processed on every mail i
write, right? hm ...

i hope you can help me there, or at least tell me to RTFM at which
point.

thanks in advance

andré

{1} http://www.sacredchao.net/freednd/gnarr/index.shtml
{2} http://www.mutt.org/doc/manual/manual-3.html#send-hook

-- 
For Moradin, the forge, and the brave!



send-hooks and save_name

2001-03-08 Thread Rich Lafferty

Hi,

I'm having trouble figuring out how to change the behavior of mutt's
save_name feature.

What I'm trying to do is to get mutt to do the save_name thing, except
instead of having it save in =username, I want it to save in
=work/username if any recipient's address contains "concordia.ca", and
in =personal/username if no recipient's address contains "concordia.ca".

I tried playing with changing the value of "folder" with a send-hook,
but since it doesn't reset immediately after, it mungs up normal
operations (since I still want "folder" to just be "~/mail/").

Is there a straightforward way to do such a thing?

  -Rich

-- 
-- Rich Lafferty ---
 Sysadmin/Programmer, Instructional and Information Technology Services
   Concordia University, Montreal, QC (514) 848-7625
- [EMAIL PROTECTED] --



Re: send-hooks and save_name

2001-03-08 Thread Gary Johnson

On Thu, Mar 08, 2001 at 11:02:03AM -0500, Rich Lafferty wrote:

 I tried playing with changing the value of "folder" with a send-hook,
 but since it doesn't reset immediately after, it mungs up normal
 operations (since I still want "folder" to just be "~/mail/").
 
 Is there a straightforward way to do such a thing?

If your send-hooks work except for the resetting problem, the solution
is easy.  Just add the following lint to your muttrc _above_ the other
send-hooks so that it will be executed before the others.

send-hook . 'set folder=~/Mail'

Gary

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



Re: send-hooks and save_name

2001-03-08 Thread Rich Lafferty

On Thu, Mar 08, 2001 at 08:14:49AM -0800, Gary Johnson ([EMAIL PROTECTED]) 
wrote:
 On Thu, Mar 08, 2001 at 11:02:03AM -0500, Rich Lafferty wrote:
 
  I tried playing with changing the value of "folder" with a send-hook,
  but since it doesn't reset immediately after, it mungs up normal
  operations (since I still want "folder" to just be "~/mail/").
  
  Is there a straightforward way to do such a thing?
 
 If your send-hooks work except for the resetting problem, the solution
 is easy.  Just add the following lint to your muttrc _above_ the other
 send-hooks so that it will be executed before the others.
 
 send-hook . 'set folder=~/Mail'

Well, with that I end up with
 
  send-hook . 'set folder=~/Mail'
  send-hook concordia.ca 'set folder=~/Mail/conu'
  send-hook !concordia.ca 'set folder=~/Mail/personal'

and, as you can see, that first condition never happens. :-) But this
helped me realize what the problem is -- with your default send-hook,
it resets "folder" as soon as I go to *send* again. What I need is for
"folder" to be set as I go to send, and to be reset to "~/Mail/" as
soon as the message I'm sending is on its way.

Hrm. This gets me very close:

  folder-hook . 'set folder=~/mail'
  send-hook concordia.ca 'set folder=~/mail/conu'
  send-hook !concordia.ca 'set folder=~/mail/personal'

except that going from the send screen to the index doesn't trigger a
folder-hook. (That'd be handy if it did, though, wishlist folks.)

I'm beginning to think that there *is* no hook that takes place after
a message is sent, so I can't think of any way to improve on the
above.

   -Rich

-- 
-- Rich Lafferty ---
 Sysadmin/Programmer, Instructional and Information Technology Services
   Concordia University, Montreal, QC (514) 848-7625
- [EMAIL PROTECTED] --



Re: send-hooks and save_name

2001-03-08 Thread Peter Kovacs

On Thu, Mar 08, 2001 at 11:29:23AM -0500, Rich Lafferty wrote:
   folder-hook . 'set folder=~/mail'
   send-hook concordia.ca 'set folder=~/mail/conu'
   send-hook !concordia.ca 'set folder=~/mail/personal'
 
how about:
send-hook . 'set folder=~/mail/personal'
send-hook concordia.ca 'set folder=~/mail/conu'


Peter

-- 
Peter D. Kovacs [EMAIL PROTECTED]
Software Developer
Webmachines, Inc. http://webmachines.com



Re: send-hooks and save_name

2001-03-08 Thread Rich Lafferty

On Thu, Mar 08, 2001 at 11:47:00AM -0500, Peter Kovacs ([EMAIL PROTECTED]) wrote:
 On Thu, Mar 08, 2001 at 11:29:23AM -0500, Rich Lafferty wrote:
folder-hook . 'set folder=~/mail'
send-hook concordia.ca 'set folder=~/mail/conu'
send-hook !concordia.ca 'set folder=~/mail/personal'
  
 how about:
   send-hook . 'set folder=~/mail/personal'
   send-hook concordia.ca 'set folder=~/mail/conu'

I think I'm actually going to have to just actively set Fcc as I
go. The problem with your suggestion is that with that the folder is
*never* reset to ~/mail, and I've a lot more subdirectories than just
conu/ and personal/ (it's just that those two are the only ones I'd
want mail *automagically* saved into).

  -Rich

-- 
-- Rich Lafferty ---
 Sysadmin/Programmer, Instructional and Information Technology Services
   Concordia University, Montreal, QC (514) 848-7625
- [EMAIL PROTECTED] --



Re: send-hooks and save_name

2001-03-08 Thread Ben Rosenberg

How about using Procmail rules to put your mail where you like?

* Rich Lafferty ([EMAIL PROTECTED]) [010308 08:56]:
=On Thu, Mar 08, 2001 at 11:47:00AM -0500, Peter Kovacs ([EMAIL PROTECTED]) wrote:
= On Thu, Mar 08, 2001 at 11:29:23AM -0500, Rich Lafferty wrote:
=folder-hook . 'set folder=~/mail'
=send-hook concordia.ca 'set folder=~/mail/conu'
=send-hook !concordia.ca 'set folder=~/mail/personal'
=  
= how about:
= send-hook . 'set folder=~/mail/personal'
= send-hook concordia.ca 'set folder=~/mail/conu'
=
=I think I'm actually going to have to just actively set Fcc as I
=go. The problem with your suggestion is that with that the folder is
=*never* reset to ~/mail, and I've a lot more subdirectories than just
=conu/ and personal/ (it's just that those two are the only ones I'd
=want mail *automagically* saved into).
=

-- 
Ben Rosenberg
mailto:[EMAIL PROTECTED]
-
If two men agree on everything, you can
be sure that only one of them is doing
the thinking.



Re: send-hooks and save_name

2001-03-08 Thread Gary Johnson

On Thu, Mar 08, 2001 at 11:29:23AM -0500, Rich Lafferty wrote:

 Well, with that I end up with
  
   send-hook . 'set folder=~/Mail'
   send-hook concordia.ca 'set folder=~/Mail/conu'
   send-hook !concordia.ca 'set folder=~/Mail/personal'
 
 and, as you can see, that first condition never happens. :-) But this
 helped me realize what the problem is -- with your default send-hook,
 it resets "folder" as soon as I go to *send* again. What I need is for
 "folder" to be set as I go to send, and to be reset to "~/Mail/" as

 I'm beginning to think that there *is* no hook that takes place after
 a message is sent, so I can't think of any way to improve on the
 above.

OK, now I think I understand the problem.  I can't think of any hooks
that work the way you want, either.  I did think of something else that
might work, though.

macro compose y "send-message:push :set folder=~/Mail"

I have not tried that to see if it actually works.  One problem with
this approach is that you really need to create such macros for every
command that leaves the compose menu, such as 'q' and 'P', and such a
macro for 'q' would not work if 'postpone' was set to 'ask-yes' or
'ask-no'.

Gary

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



Re: send-hooks

2000-11-08 Thread Goblin

I've found my stupidity. I know regex, so I should have seen this
right away.

^@domain.com will always be a no-grok.

Thanks anyway.

On 11/08, Me rearranged the electrons to read:
 Can someone help me? I've got the following lines in my .muttrc:
 send-hook '~f ^@domain\.com$' 'my_hdr From: User Name [EMAIL PROTECTED]'
 send-hook '~t ^@domain\.com$' 'my_hdr From: User Name [EMAIL PROTECTED]'
 
 with which I am trying to accomplish the following: I'd like that
 when I reply to messages coming from domain.com, that my From:
 header be modified like stated above.
 
 It isn't working, and I'd like some help please.
 
 Here's my version info:
 
 Mutt 1.3.9i (2000-09-21)
 Copyright (C) 1996-2000 Michael R. Elkins and others.
 Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
 Mutt is free software, and you are welcome to redistribute it
 under certain conditions; type `mutt -vv' for details.
 
 System: Linux 2.4.0-test10p6-reis3.6.18 [using slang 10400]
 Compile options:
 DOMAIN="yahoo.com"
 +DEBUG
 -HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  
 +USE_FCNTL  -USE_FLOCK
 +USE_POP  +USE_IMAP  -USE_GSS  +USE_SSL  -USE_SASL  
 +HAVE_REGCOMP  -USE_GNU_REGEX  
 +HAVE_COLOR  -HAVE_START_COLOR  -HAVE_TYPEAHEAD  -HAVE_BKGDSET  
 -HAVE_CURS_SET  -HAVE_META  -HAVE_RESIZETERM  
 +HAVE_PGP  -BUFFY_SIZE -EXACT_ADDRESS  +SUN_ATTACHMENT  
 +ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET
 +HAVE_LANGINFO_YESEXPR  
 +HAVE_ICONV  -ICONV_NONTRANS  +HAVE_GETSID
 ISPELL="/usr/bin/ispell"
 SENDMAIL="/usr/sbin/sendmail"
 MAILPATH="/var/spool/mail"
 SHAREDIR="/usr/share/mutt"
 SYSCONFDIR="/usr/etc"
 EXECSHELL="/bin/sh"
 -MIXMASTER
 To contact the developers, please mail to [EMAIL PROTECTED].
 To report a bug, please use the flea(1) utility.
 
  Your eyes are weary from staring at the CRT.  You feel sleepy.  Notice how
  restful it is to watch the cursor blink.  Close your eyes.  The opinions
  stated above are yours.  You cannot imagine why you ever felt otherwise.
 
 Your eyes are weary from staring at the CRT.  You feel sleepy.  Notice how
 restful it is to watch the cursor blink.  Close your eyes.  The opinions
 stated above are yours.  You cannot imagine why you ever felt otherwise.




send-hooks

2000-11-08 Thread Goblin

Can someone help me? I've got the following lines in my .muttrc:
send-hook '~f ^@domain\.com$' 'my_hdr From: User Name [EMAIL PROTECTED]'
send-hook '~t ^@domain\.com$' 'my_hdr From: User Name [EMAIL PROTECTED]'

with which I am trying to accomplish the following: I'd like that
when I reply to messages coming from domain.com, that my From:
header be modified like stated above.

It isn't working, and I'd like some help please.

Here's my version info:

Mutt 1.3.9i (2000-09-21)
Copyright (C) 1996-2000 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: Linux 2.4.0-test10p6-reis3.6.18 [using slang 10400]
Compile options:
DOMAIN="yahoo.com"
+DEBUG
-HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  
+USE_FCNTL  -USE_FLOCK
+USE_POP  +USE_IMAP  -USE_GSS  +USE_SSL  -USE_SASL  
+HAVE_REGCOMP  -USE_GNU_REGEX  
+HAVE_COLOR  -HAVE_START_COLOR  -HAVE_TYPEAHEAD  -HAVE_BKGDSET  
-HAVE_CURS_SET  -HAVE_META  -HAVE_RESIZETERM  
+HAVE_PGP  -BUFFY_SIZE -EXACT_ADDRESS  +SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET
+HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  +HAVE_GETSID
ISPELL="/usr/bin/ispell"
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/spool/mail"
SHAREDIR="/usr/share/mutt"
SYSCONFDIR="/usr/etc"
EXECSHELL="/bin/sh"
-MIXMASTER
To contact the developers, please mail to [EMAIL PROTECTED].
To report a bug, please use the flea(1) utility.

 Your eyes are weary from staring at the CRT.  You feel sleepy.  Notice how
 restful it is to watch the cursor blink.  Close your eyes.  The opinions
 stated above are yours.  You cannot imagine why you ever felt otherwise.




send-hooks a la Pine Roles.

2000-10-24 Thread Adrian Chung

Hi all!  A co-worker stated the other day that the biggest feature that has
kept him from switching from Pine to mutt is the fact that pine supports
roles.

From what I could gather, a role in pine basically allows you to set your
From: email address depending on who the message you're replying to was
_addressed_ to.

Everytime I ask this question (off the list, in #mutt on IRC for example),
people respond quickly by saying this can be done with a send-hook.

To give a specific example: an email comes in to [EMAIL PROTECTED]
and I want to reply to it as [EMAIL PROTECTED] instead of my personal
address.

The suggestions I've heard say to do something like:

send-hook \
'~t [EMAIL PROTECTED]' \
'my_hdr From: [EMAIL PROTECTED]'

Which doesn't work, because the ~t criteria looks at the headers of the
outgoing message I'm composing, rather than the original inbound message.
And since I'm not composing the message to [EMAIL PROTECTED], this hook
doesn't work.

I'm wondering whether there's a good way to do this, or if it's even
possible to use '~' variables but based on the headers from the original
inbound message, and not from the outbound message.

I'm assuming that this is a feature that is hardly ever used, since it's
not been implemented.  Would it be handy to anyone?

--
Adrian Chung  Software Engineer e-smith, Inc.
[EMAIL PROTECTED]   +1 613 564 8000x4379  888 ESMITH 1
Suite 1500, 150 Metcalfe St, Ottawa, ON, K2P 1P1, Canada
www.e-smith.com (corporate) | www.e-smith.org (development)



Re: send-hooks a la Pine Roles.

2000-10-24 Thread Suresh Ramasubramanian

Adrian Chung proclaimed on mutt-users that: 

 The suggestions I've heard say to do something like:
 
   send-hook \
   '~t [EMAIL PROTECTED]' \
   'my_hdr From: [EMAIL PROTECTED]'
 
 set alternates, and set reverse_name
 
 I'm assuming that this is a feature that is hardly ever used, since it's
 not been implemented.  Would it be handy to anyone?
 
 It is already there.

 Or you could procmail mail to different folders based on the envelope and use
 folder hook foo `my_hdr From: [EMAIL PROTECTED] (Foo Bar)' (and set envelope_from in
 new mutts / set sendmail = /path/to/sendmail -t -oi -oem -f [EMAIL PROTECTED]' in
 old mutts)
 
 Adrian Chung  Software Engineer e-smith, Inc.
 [EMAIL PROTECTED]   +1 613 564 8000x4379  888 ESMITH 1

[way ot]

e-smith rocks - 'cept that it uses qmail ;)

-s (exim and sendmail preferred - if y'all could come out with a version
supporting this?)

-- 
Suresh Ramasubramanian + Wallopus Malletus Indigenensis
mallet @ cluestick.org + Lumber Cartel of India, tinlcI
Life is too short to be taken seriously.
-- Oscar Wilde



Re: send-hooks a la Pine Roles.

2000-10-24 Thread Adrian Chung

On Tue, Oct 24, 2000 at 11:13:30PM +0530, Suresh Ramasubramanian 
[EMAIL PROTECTED] wrote:
 Adrian Chung proclaimed on mutt-users that: 
 
  The suggestions I've heard say to do something like:
  
  send-hook \
  '~t [EMAIL PROTECTED]' \
  'my_hdr From: [EMAIL PROTECTED]'
  
  set alternates, and set reverse_name

   I've got alternates set, and I tried both set reverse_name and set
reverse_realname.  I'm not having any luck with either.  With mail
addresses to a different address (actually different user, same domain),
when I hit reply, I get my username @ my.local.machine.name.  

   So I'm checking through my .muttrc to see if I've got anything else
that's conflicting.  Strange...

  Or you could procmail mail to different folders based on the envelope and use
  folder hook foo `my_hdr From: [EMAIL PROTECTED] (Foo Bar)' (and set envelope_from in
  new mutts / set sendmail = /path/to/sendmail -t -oi -oem -f [EMAIL PROTECTED]' in
  old mutts)

   Could do that...  But seems like more trouble than it's worth. :)

  Adrian Chung  Software Engineer e-smith, Inc.
  [EMAIL PROTECTED]   +1 613 564 8000x4379  888 ESMITH 1
 
 [way ot]
 
 e-smith rocks - 'cept that it uses qmail ;)
 
 -s (exim and sendmail preferred - if y'all could come out with a version
 supporting this?)

   Why don't you like qmail?

   I doubt we'll ever support sendmail again, although there's always room
for sendmail contrib stuff. :)

--
Adrian Chung  Software Engineer e-smith, Inc.
[EMAIL PROTECTED]   +1 613 564 8000x4379  888 ESMITH 1
Suite 1500, 150 Metcalfe St, Ottawa, ON, K2P 1P1, Canada
www.e-smith.com (corporate) | www.e-smith.org (development)



Re: send-hooks a la Pine Roles.

2000-10-24 Thread Suresh Ramasubramanian

Using a large mallet, Adrian Chung whacked out:

 when I hit reply, I get my username @ my.local.machine.name.  
 
 likely you have to set the envelope sender too - post the relevant parts of
 your muttrc plz
 
Why don't you like qmail?
 
 it's an allergy of some kind :P  I prefer exim (or if forced to, sendmail)
 
-- 
Suresh Ramasubramanian + Wallopus Malletus Indigenensis
mallet @ cluestick.org + Lumber Cartel of India, tinlcI
GREAT MOMENTS IN HISTORY (#7):  November 23, 1915
Pancake make-up is invented; most people continue to prefer syrup.



send-hooks not reset

2000-10-24 Thread Adrian Chung

Hi!  I figured out how to set things up so that now I can properly reply to
different people based on the original inbound email address.

But I ran into a strange occurrence, which I'm not sure is my fault.

I've set up mutt so that:

set reverse_name
set from="Adrian Chung [EMAIL PROTECTED]"
alternates="(support|achung)@mycompany\.(com|net|org)"

send-hook '~f support@mycompany' 'my_hdr From: company support [EMAIL PROTECTED]'
send-hook '~f support@mycompany' 'set signature=~/.signature-support'

This works properly, so that if email comes in addressed to
[EMAIL PROTECTED], and I hit reply, or reply-all, I get the proper
outgoing From: header, and signature.

The problem is, when I finish composing that message, and then attempt to
compose a new message, by pressing 'c', and then typing in a random
address, I still get the From: header and signature from above.

Is this normal behaviour?  Do I have to set a default send-hook to reset
every parameter that I change?

--
Adrian Chung  Software Engineer e-smith, Inc.



Re: send-hooks not reset

2000-10-24 Thread Dan Boger

On Tue, Oct 24, 2000 at 04:53:25PM -0400, Adrian Chung wrote:
 set from="Adrian Chung [EMAIL PROTECTED]"
 alternates="(support|achung)@mycompany\.(com|net|org)"
 
 send-hook '~f support@mycompany' 'my_hdr From: company support 
[EMAIL PROTECTED]'
 send-hook '~f support@mycompany' 'set signature=~/.signature-support'
 
 Is this normal behaviour?  Do I have to set a default send-hook to reset
 every parameter that I change?

exactly.  when you set the sig, or a header, it's not only for that message.
so you need to do something like:

send-hook . 'unmy_hdr From:'
send-hook . 'unset signature'

-- 
Dan Boger
System Administrator
[EMAIL PROTECTED]

 PGP signature


Re: send-hooks not reset

2000-10-24 Thread Adrian Chung

On Tue, Oct 24, 2000 at 05:22:30PM -0400, Dan Boger [EMAIL PROTECTED] wrote:
 On Tue, Oct 24, 2000 at 04:53:25PM -0400, Adrian Chung wrote:
  set from="Adrian Chung [EMAIL PROTECTED]"
  alternates="(support|achung)@mycompany\.(com|net|org)"
  
  send-hook '~f support@mycompany' 'my_hdr From: company support 
[EMAIL PROTECTED]'
  send-hook '~f support@mycompany' 'set signature=~/.signature-support'
  
  Is this normal behaviour?  Do I have to set a default send-hook to reset
  every parameter that I change?
 
 exactly.  when you set the sig, or a header, it's not only for that message.
 so you need to do something like:
 
 send-hook . 'unmy_hdr From:'
 send-hook . 'unset signature'

   Cool, so it's not just me...

   Is this classified as a bug, or a feature? :)

--
Adrian Chung  Software Engineer e-smith, Inc.
[EMAIL PROTECTED]   +1 613 564 8000x4379  888 ESMITH 1
Suite 1500, 150 Metcalfe St, Ottawa, ON, K2P 1P1, Canada
www.e-smith.com (corporate) | www.e-smith.org (development)



Re: send-hooks a la Pine Roles.

2000-10-24 Thread Mikko Hänninen

Adrian Chung [EMAIL PROTECTED] wrote on Tue, 24 Oct 2000:
I've got alternates set, and I tried both set reverse_name and set
 reverse_realname.  I'm not having any luck with either.  With mail
 addresses to a different address (actually different user, same domain),
 when I hit reply, I get my username @ my.local.machine.name.  

Make sure you don't use $reverse_name with "my_hdr From".  The two are
incompatible.


This is actually not strictly so, but if you ever use my_hdr From in a
send-hook, you *must* also have "send-hook . unmy_hdr From" too...  It's
easier to just not mix the two, unless you really need to for some
reason.  If you want to change your default From address, it can be done
with setting $from (in Mutt 1.2 and later).


I hope this helps,
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 /
"Macs are actually decent machines once you put an OS on them."



Re: send-hooks not reset

2000-10-24 Thread Mikko Hänninen

Adrian Chung [EMAIL PROTECTED] wrote on Tue, 24 Oct 2000:
  send-hook . 'unmy_hdr From:'
 
Is this classified as a bug, or a feature? :)

It's a feature, a design desicision.  Since you can use any muttrc
command in send-hooks, it would be unworkably complex to try to limit
the scope to that message only.  It's something you just have to be
aware of when working send-hooks, that for every hook that you use, if
you want to have a default value, you must set it yourself with a
"send-hook . whatever".


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 /
Always remember you're unique - just like everyone else.



Re: send-hooks

2000-10-07 Thread Jason Helfman

I have this at work too. However, I incorporated folder-hook for this
function, and it works very nicely. Folder-hook and send-hooks, used
with each other seemed to do the trick for me.

If you use $edit_headers that should do the trick though, i would think.

On Tue, Sep 19, 2000 at 04:41:33PM -0500, Darren West muttered:
| send-hook is a really cool feature, since it allows me to have a "work profile" and 
|a "non-work" each with custom signatures and header info, based on who I am sending 
|mail to.  
| If I invoke mail(compose) from within mutt via keybind 'm' in a folder though, it 
|always pops into the default profile..since the send-hook is dependant on the "To" 
|info.  
| It would be great if it first prompted for "To" info, then created the header 
|appropriately.  Perhaps this feature can be included in a future version.
| -- 
| Darren
| 219-765-1149 cell
| [EMAIL PROTECTED]
| 

-- 
/Jason G Helfman

"At any given moment, you may find the ticket to the circus that has always
been in your possession."

Fingerprint: 6A32 3774 E390 33B5 8C96  2AA1 2BF4 BD71 35A1 C149
GnuPG http://www.gnupg.org  Get Private!  1024D/35A1C149



Re: send-hooks

2000-09-19 Thread Mikko Hänninen

Darren West [EMAIL PROTECTED] wrote on Tue, 19 Sep 2000:
 If I invoke mail(compose) from within mutt via keybind 'm' in a folder
 though, it always pops into the default profile..since the send-hook is
 dependant on the "To" info.
 It would be great if it first prompted for "To" info, then created the
 header appropriately.  Perhaps this feature can be included in a future
 version.

That's how it works for me, even for new messages.

Maybe you have $autoedit set?  Refer to the manual for more info.


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 /
Bumper sticker: No radio - Already stolen.



Re: send-hooks matching all users - how?

2000-08-14 Thread Mikko Hänninen

Randall Hopper [EMAIL PROTECTED] wrote on Sun, 13 Aug 2000:
  manual.txt suggests a leading '^', but this doesn't work.  Maybe 
 it only works where you can specify a pattern flag, as in:  ^~C \.de$

Well, you *can* do this with send-hooks.  If you only specify a pattern,
but no pattern operator, Mutt will use the value from $default_hook as
the operators.  (Check the manual for $default_hook)  You do need to use
the pattern operator so you can add the ^ prefix.

So, if you use this kind of send-hook instead, it should work:

  send-hook "^~C (jim|john|joe)@home.com" "set pgp_autoencrypt"


Hope this helps,
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 /
"I took an IQ test and the results were negative."



Re: send-hooks matching all users - how?

2000-08-14 Thread Randall Hopper

Mikko Hänninen:
 |Randall Hopper [EMAIL PROTECTED] wrote on Sun, 13 Aug 2000:
 |  manual.txt suggests a leading '^', but this doesn't work.  Maybe 
 | it only works where you can specify a pattern flag, as in:  ^~C \.de$
 |
 |Well, you *can* do this with send-hooks.  If you only specify a pattern,
 |but no pattern operator, Mutt will use the value from $default_hook as
 |the operators.  (Check the manual for $default_hook)  You do need to use
 |the pattern operator so you can add the ^ prefix.
 |
 |So, if you use this kind of send-hook instead, it should work:
 |
 |  send-hook "^~C (jim|john|joe)@home.com" "set pgp_autoencrypt"

Well, I tried that before my original post.  Here is the error Mutt
generates on start-up:

  Error in /home/rhh/.mutt/lists.mutt, line 29: parentheses not balanced
  Error in /home/rhh/.muttrc-1.2i, line 205: source: errors in 
/home/rhh/.mutt/lists.mutt
  source: errors in /home/rhh/.muttrc-1.2i

Line 29 of lists.mutt is where this send-hook is.

-- 
Randall Hopper
[EMAIL PROTECTED]



Re: send-hooks matching all users - how?

2000-08-14 Thread Mikko Hänninen

Randall Hopper [EMAIL PROTECTED] wrote on Mon, 14 Aug 2000:
 Well, I tried that before my original post.  Here is the error Mutt
 generates on start-up:
 
   Error in /home/rhh/.mutt/lists.mutt, line 29: parentheses not balanced
   Error in /home/rhh/.muttrc-1.2i, line 205: source: errors in 
/home/rhh/.mutt/lists.mutt
   source: errors in /home/rhh/.muttrc-1.2i
 
 Line 29 of lists.mutt is where this send-hook is.

Oh, right.  That's the usual "|'s in patterns must be quoted" issue.

Try this:

  send-hook "^~C '(jim|john|joe)@home.com'" "set pgp_autoencrypt"

Or if that doesn't work, try escaping (\) the |'s, or double escaping...
It's a known issue, sort of a bug, in the way the pattern matcher works.


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 /
No computers were harmed during the creation of this email.



Re: Using send-hooks with replies

2000-04-03 Thread Charles Curley

On Wed, Jan 26, 2000 at 04:29:01PM -0600, Jeremy Blosser muttered:
- Edmund GRIMLEY EVANS [[EMAIL PROTECTED]] wrote:
-  Jimmy Mäkelä [EMAIL PROTECTED]:
-   Is it possible to look at the original To: of the message which I wan't
-   to reply to, and execute commands based on the contents of that.
-   
-   This would be nice since it is pretty common to have more than one
-   email-address, and it is IMHO better to have the address which they wrote
-   to as From in the reply.
-  
-  This must surely be the second most frequently asked question (after
-  the one about hooks having a permanent effect unless you also have a
-  default hook to reset the state).
- 
- I don't know, "how do I make Mutt filter mail" is pretty popular too ;)
- 
-  See reverse_name in the latest mutt. Unfortunately this isn't in
-  mutt-1.0, I think.
- 
- Others have noted this has been around forever, I will add that you should
- also see the $alternates variable, as reverse_name is useless without it.

OK, having gotten this far, how do you set it up? I experimented and came
up with the following:


# Set the various names by which I expect to get email. A regex.
set alternates="([EMAIL PROTECTED]|[EMAIL PROTECTED]|[EMAIL PROTECTED])"


send-hook '~f [EMAIL PROTECTED]' "set signature=~/.sig.wyolp.web; \
my_hdr From: [EMAIL PROTECTED]; \
my_hdr Reply-To: Charles Curley [EMAIL PROTECTED]"



Mutt version is 1.0.1.

-- 

-- C^2

No windows were crashed in the making of this email.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley



Re: Using send-hooks with replies

2000-04-03 Thread Charles Curley

On Mon, Apr 03, 2000 at 11:41:53AM -0600, Charles Curley muttered:
- On Wed, Jan 26, 2000 at 04:29:01PM -0600, Jeremy Blosser muttered:
- - Edmund GRIMLEY EVANS [[EMAIL PROTECTED]] wrote:
- -  Jimmy Mäkelä [EMAIL PROTECTED]:
- -   Is it possible to look at the original To: of the message which I wan't
- -   to reply to, and execute commands based on the contents of that.
- -   
- -   This would be nice since it is pretty common to have more than one
- -   email-address, and it is IMHO better to have the address which they wrote
- -   to as From in the reply.
- -  
- -  This must surely be the second most frequently asked question (after
- -  the one about hooks having a permanent effect unless you also have a
- -  default hook to reset the state).
- - 
- - I don't know, "how do I make Mutt filter mail" is pretty popular too ;)
- - 
- -  See reverse_name in the latest mutt. Unfortunately this isn't in
- -  mutt-1.0, I think.
- - 
- - Others have noted this has been around forever, I will add that you should
- - also see the $alternates variable, as reverse_name is useless without it.
- 
- OK, having gotten this far, how do you set it up? I experimented and came
- up with the following:
- 
- 
- # Set the various names by which I expect to get email. A regex.
- set alternates="([EMAIL PROTECTED]|[EMAIL PROTECTED]|[EMAIL PROTECTED])"
- 
- 
- send-hook '~f [EMAIL PROTECTED]' "set signature=~/.sig.wyolp.web; \
- my_hdr From: [EMAIL PROTECTED]; \
- my_hdr Reply-To: Charles Curley [EMAIL PROTECTED]"
- 
- 
- 
- Mutt version is 1.0.1.

Also, it helps if you set generic hooks to set the variable back to their
defaults for the next message. Otherwise when you send a reply to an email
sent to alternate address, the changes become permanent until you send a
reply to an email to another alternate address.


# globals, apply to all emails.
send-hook . unmy_hdr Reply-To:
send-hook . 'my_hdr From: [EMAIL PROTECTED]'
send-hook . 'set attribution="On %d, %n wrote:"'
send-hook . set signature=~/.signatures/.signature


Is anyone maintaining a Mutt HOW-TO?


-- 

-- C^2

No windows were crashed in the making of this email.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley



Re: Using send-hooks with replies

2000-04-03 Thread Mikko Hänninen

Charles Curley [EMAIL PROTECTED] wrote on Mon, 03 Apr 2000:
 - Others have noted this has been around forever, I will add that you should
 - also see the $alternates variable, as reverse_name is useless without it.
 
 OK, having gotten this far, how do you set it up? I experimented and came
 up with the following:
 
 # Set the various names by which I expect to get email. A regex.
 set alternates="([EMAIL PROTECTED]|[EMAIL PROTECTED]|[EMAIL PROTECTED])"

I'm not sure if you're asking for comments or not.  That looks fine to
me though.

 send-hook '~f [EMAIL PROTECTED]' "set signature=~/.sig.wyolp.web; \
 my_hdr From: [EMAIL PROTECTED]; \
 my_hdr Reply-To: Charles Curley [EMAIL PROTECTED]"

You may want to use

  my_hdr From: Charles Curley [EMAIL PROTECTED]

ie. include your name in the From header as well.  Also, there's no need
to specify a Reply-To at all if the address is the same as From, that's
the default.  Reply-To should only be specified if it's different from
the From header.


Charles Curley [EMAIL PROTECTED] wrote on Mon, 03 Apr 2000:
 Also, it helps if you set generic hooks to set the variable back to their
 defaults for the next message.

Indeed. :-)

 Is anyone maintaining a Mutt HOW-TO?

Not that I know of, unless you count the FAQ as such.


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 /
When I try to get a life...  I always get either 404 or server timeout. :-(



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



Re: Using send-hooks with replies

2000-01-26 Thread Edmund GRIMLEY EVANS

Jimmy Mäkelä [EMAIL PROTECTED]:

 Is it possible to look at the original To: of the message which I wan't
 to reply to, and execute commands based on the contents of that.
 
 This would be nice since it is pretty common to have more than one
 email-address, and it is IMHO better to have the address which they wrote
 to as From in the reply.

This must surely be the second most frequently asked question (after
the one about hooks having a permanent effect unless you also have a
default hook to reset the state).

See reverse_name in the latest mutt. Unfortunately this isn't in
mutt-1.0, I think.

Edmund



Re: Using send-hooks with replies

2000-01-26 Thread Mikko Hänninen

Edmund GRIMLEY EVANS [EMAIL PROTECTED] wrote on Wed, 26 Jan 2000:
 This must surely be the second most frequently asked question (after
 the one about hooks having a permanent effect unless you also have a
 default hook to reset the state).

Indeed. :-)

 See reverse_name in the latest mutt. Unfortunately this isn't in
 mutt-1.0, I think.

It is in Mutt 1.0 (and later).  At least my version 1.0 has it. :-)


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 /
  unzip ; strip ; touch ; finger ; mount ; gasp ; yes ; umount ; sleep



Re: Using send-hooks with replies

2000-01-26 Thread Thomas Roessler

On 2000-01-26 13:25:33 +, Edmund GRIMLEY EVANS wrote:

 See reverse_name in the latest mutt. Unfortunately this isn't in
 mutt-1.0, I think.

Reverse_name is a pretty old feature, and certainly present in
stable.

However, it's more useful together with the new versions' "from"
variable.

-- 
http://www.guug.de/~roessler/




Re: Using send-hooks with replies

2000-01-26 Thread Jeremy Blosser

Edmund GRIMLEY EVANS [[EMAIL PROTECTED]] wrote:
 Jimmy Mäkelä [EMAIL PROTECTED]:
  Is it possible to look at the original To: of the message which I wan't
  to reply to, and execute commands based on the contents of that.
  
  This would be nice since it is pretty common to have more than one
  email-address, and it is IMHO better to have the address which they wrote
  to as From in the reply.
 
 This must surely be the second most frequently asked question (after
 the one about hooks having a permanent effect unless you also have a
 default hook to reset the state).

I don't know, "how do I make Mutt filter mail" is pretty popular too ;)

 See reverse_name in the latest mutt. Unfortunately this isn't in
 mutt-1.0, I think.

Others have noted this has been around forever, I will add that you should
also see the $alternates variable, as reverse_name is useless without it.

-- 
Jeremy Blosser   |   [EMAIL PROTECTED]   |   http://jblosser.firinn.org/
-+-+--
"If Microsoft can change and compete on quality, I've won." -- L. Torvalds

 PGP signature


Re: Send-Hooks

1999-12-19 Thread Mikko Hänninen

Sean Rima [EMAIL PROTECTED] wrote on Tue, 14 Dec 1999:
 On Tue, 14 Dec 1999, David T-G wrote:
  Ah.  Well, then, you probably want to set "use_from" and "alternates"
  in your .muttrc
 
 Both set and still no joy. I tried unsetting (commenting out) my defaults
 send-hook my_hdr but to no avail. I think I will just for the moment have to
 have several commented out my_hdr From lines to suit.

I think the variable you're looking for is $reverse_name, not $use_from
(though having that defined is probably a good idea too).  However,
$reverse_name doesn't work well with mh_hdr From (which always takes
precedence).  So instead you probably should switch to setting the $from
variable, available in Mutt 1.1.1i which you seem to use, rather than
having my_hdr From in your send-hooks.  The $from variable was
introduced just to get around the problem of $reverse_name and my_hdr
From not working together.


Hope this helps,
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 /
Free the mallocs!



Re: Send-Hooks

1999-12-19 Thread Sean Rima

Hi Mikko!

On Mon, 20 Dec 1999, Mikko Hänninen wrote:

   Ah.  Well, then, you probably want to set "use_from" and "alternates"
   in your .muttrc
  
  Both set and still no joy. I tried unsetting (commenting out) my defaults
  send-hook my_hdr but to no avail. I think I will just for the moment have to
  have several commented out my_hdr From lines to suit.
 
 I think the variable you're looking for is $reverse_name, not $use_from
 (though having that defined is probably a good idea too).  However,
 $reverse_name doesn't work well with mh_hdr From (which always takes
 precedence).  So instead you probably should switch to setting the $from
 variable, available in Mutt 1.1.1i which you seem to use, rather than
 having my_hdr From in your send-hooks.  The $from variable was
 introduced just to get around the problem of $reverse_name and my_hdr
 From not working together.
 
 

Many thanks, that has done the job. I am learning more and more just how
powerfull mutt is :)

Sean

-- 
GPG ID (DSA) 92B9D0CF PGP2 ID 19592A0D Linux User: #124682  ICQ: 679813
To get my PGP Keys send me an empty email with retrieve as the subject
My Current Uptime is 0d, 15h and 4m on Linux 2.2.13
...Generated by Uptimer - http://tcob1.dhs.org


 PGP signature


Re: Problems using send-hooks?

1999-12-16 Thread David T-G

Hello!

...and then Jackal said...
% I have some problems with the send-hooks in my muttrc.  It does not seem to
% work as I expect it.  Maybe someone can enlighten me.

I can try...


% 
% I have these two send-hooks in my muttrc
% 
% send-hook '~t@' 'my_hdr From: Default Name default@email ; set 
sendmail='/path/to/sendmail -oi -oem -f default@email'"
% send-hook '~t@work' 'my_hdr From: Work Name workname@work ; set 
sendmail='/path/to/sendmail -oi -oem -f workname@work'"

Hmmm...  Seems a bit complicated to me.

First, I'd just use a default hook (send-hook .) instead of another
match.  Second, I'd just use a my_hdr instead of messing with sendmail.

So you get something like

  send-hook . 'my_hdr From: Default Name default@email'
  send-hook "~t @work' 'my_hdr From: Work Name workname@work'

for your .muttrc file.  The my_hdr should take care of sendmail and the
from envelope, IIUC.  And the default hook will definitely match once
you're not sending to someone at work.


% 
% i thought that would mean that whenever I send a mail addressed to anyone with
% a @work address mutt would set the sendmail as per the send-hook rule and the From: 
as well.
% 
% But if i send a work email and then send a personal one...it does not set the
% sendmail back to the default@email but the From is correct
% 
% anybody knows what I am talking about here?

HTH


:-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!
"Why2k?  Well, I didn't think at the time that I could charge any more!"
Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*


 PGP signature


Re: Problems using send-hooks?

1999-12-16 Thread Jackal

Thanks...I think the default-hook did the trick ... THanks man!

On Thu, Dec 16, 1999 at 07:43:57AM -0500, David T-G wrote:
 Hello!
 
 ...and then Jackal said...
 % I have some problems with the send-hooks in my muttrc.  It does not seem to
 % work as I expect it.  Maybe someone can enlighten me.
 
 I can try...
 
 
 % 
 % I have these two send-hooks in my muttrc
 % 
 % send-hook '~t@' 'my_hdr From: Default Name default@email ; set 
sendmail='/path/to/sendmail -oi -oem -f default@email'"
 % send-hook '~t@work' 'my_hdr From: Work Name workname@work ; set 
sendmail='/path/to/sendmail -oi -oem -f workname@work'"
 
 Hmmm...  Seems a bit complicated to me.
 
 First, I'd just use a default hook (send-hook .) instead of another
 match.  Second, I'd just use a my_hdr instead of messing with sendmail.
 
 So you get something like
 
   send-hook . 'my_hdr From: Default Name default@email'
   send-hook "~t @work' 'my_hdr From: Work Name workname@work'
 
 for your .muttrc file.  The my_hdr should take care of sendmail and the
 from envelope, IIUC.  And the default hook will definitely match once
 you're not sending to someone at work.
 
 
 % 
 % i thought that would mean that whenever I send a mail addressed to anyone with
 % a @work address mutt would set the sendmail as per the send-hook rule and the 
From: as well.
 % 
 % But if i send a work email and then send a personal one...it does not set the
 % sendmail back to the default@email but the From is correct
 % 
 % anybody knows what I am talking about here?
 
 HTH
 
 
 :-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!
 "Why2k?  Well, I didn't think at the time that I could charge any more!"
 Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*
 




==
E-Mail : [EMAIL PROTECTED]
ICQ No.: 38756924
Public GPG Key :
http://germany.keyserver.net:11371/pks/lookup?op=getsearch=0xA5D29407

-- Neophyte's serendipity.
-- Exclusive dedication to necessitious chores without interludes of
hedonistic diversion renders John a hebetudinous fellow.
-- A revolving concretion of earthy or mineral matter accumulates no
congeries of small, green bryophytic plant.
-- The person presenting the ultimate cachinnation possesses thereby the
optimal cachinnation.
-- Abstention from any aleatory undertaking precludes a potential
escallation of a lucrative nature.
-- Missiles of ligneous or osteal consistency have the potential of
fracturing osseous structure, but appellations will eternally
remain innocuous.
===



Re: Send-Hooks

1999-12-14 Thread David T-G

Sean --

If I understand you correctly, you want replies to email sent to your
yifan account to come from your softhome account, but mutt currently sets
your from address as yifan when it sees that the email was sent there.

If that's correct, then I believe you want to unset "use_from", and you
might also want to specify a "my_hdr From" command to force a particular
address.


HTH  Happy Holidays

:-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!
"Why2k?  Well, I didn't think at the time that I could charge any more!"
Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*


 PGP signature


Re: Send-Hooks

1999-12-14 Thread Sean Rima

Hi David!

On Tue, 14 Dec 1999, David T-G wrote:

 Sean --
 
 If I understand you correctly, you want replies to email sent to your
 yifan account to come from your softhome account, but mutt currently sets
 your from address as yifan when it sees that the email was sent there.
 
 If that's correct, then I believe you want to unset "use_from", and you
 might also want to specify a "my_hdr From" command to force a particular
 address.
 
 

No the other way around. If a mail comes in addressed to
[EMAIL PROTECTED], I want Mutt to set the reply as coming from
[EMAIL PROTECTED] Currently it sets all mail to From:
[EMAIL PROTECTED]

Sean

-- 
GPG ID (DSA) 92B9D0CF PGP2 ID 19592A0D Linux User: #124682  ICQ: 679813
To get my PGP Keys send me an empty email with retrieve as the subject
It said "Needs Windows 95 or better". So I installed Linux...

 PGP signature


Re: Send-Hooks

1999-12-14 Thread John P . Looney

On Tue, Dec 14, 1999 at 02:39:23PM +, Sean Rima mentioned:
 Hi David!
 
 On Tue, 14 Dec 1999, David T-G wrote:
 
  Sean --
  
  If I understand you correctly, you want replies to email sent to your
  yifan account to come from your softhome account, but mutt currently sets
  your from address as yifan when it sees that the email was sent there.
  
  If that's correct, then I believe you want to unset "use_from", and you
  might also want to specify a "my_hdr From" command to force a particular
  address.
  
  
 
 No the other way around. If a mail comes in addressed to
 [EMAIL PROTECTED], I want Mutt to set the reply as coming from
 [EMAIL PROTECTED] Currently it sets all mail to From:
 [EMAIL PROTECTED]

 I've in my .muttrc:

send-hook . my_hdr reply-to: [EMAIL PROTECTED]
send-hook . my_hdr From: John P. Looney [EMAIL PROTECTED]
send-hook ilug my_hdr From: [EMAIL PROTECTED]
send-hook ilug my_hdr Reply-to: [EMAIL PROTECTED]
send-hook [EMAIL PROTECTED] my_hdr From: [EMAIL PROTECTED]
send-hook compapp.dcu.ie my_hdr reply-to: [EMAIL PROTECTED]
send-hook compapp.dcu.ie my_hdr From: John P. Looney [EMAIL PROTECTED]
send-hook online.ie my_hdr From: John P. Looney [EMAIL PROTECTED]
send-hook online.ie my_hdr Reply-to: [EMAIL PROTECTED]

 I've loads more, but you get the idea...

Kate

-- 
Microsoft. The best reason in the world to drink beer.
http://www.redbrick.dcu.ie/~valen

 PGP signature


Re: Send-Hooks

1999-12-14 Thread David T-G

Sean --

...and then Sean Rima said...
% Hi David!

Hi there!


% 
% On Tue, 14 Dec 1999, David T-G wrote:
% 
%  yifan account to come from your softhome account, but mutt currently sets
%  
%  If that's correct, then I believe you want to unset "use_from", and you
%  might also want to specify a "my_hdr From" command to force a particular
%  address.
% 
% No the other way around. If a mail comes in addressed to
% [EMAIL PROTECTED], I want Mutt to set the reply as coming from
% [EMAIL PROTECTED] Currently it sets all mail to From:
% [EMAIL PROTECTED]

Ah.  Well, then, you probably want to set "use_from" and "alternates"
in your .muttrc so that mutt will send the reply out as the person to
whom it was addressed.  Give it a shot.


% 
% Sean
% 
% -- 
% GPG ID (DSA) 92B9D0CF PGP2 ID 19592A0D Linux User: #124682  ICQ: 679813
% To get my PGP Keys send me an empty email with retrieve as the subject
% It said "Needs Windows 95 or better". So I installed Linux...


:-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!
"Why2k?  Well, I didn't think at the time that I could charge any more!"
Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*


 PGP signature


Re: Send-Hooks

1999-12-14 Thread Sean Rima

Hi David!

On Tue, 14 Dec 1999, David T-G wrote:

 Sean --
 
 ...and then Sean Rima said...
 % Hi David!
 
 Hi there!
 
 
 % 
 % On Tue, 14 Dec 1999, David T-G wrote:
 % 
 %  yifan account to come from your softhome account, but mutt currently sets
 %  
 %  If that's correct, then I believe you want to unset "use_from", and you
 %  might also want to specify a "my_hdr From" command to force a particular
 %  address.
 % 
 % No the other way around. If a mail comes in addressed to
 % [EMAIL PROTECTED], I want Mutt to set the reply as coming from
 % [EMAIL PROTECTED] Currently it sets all mail to From:
 % [EMAIL PROTECTED]
 
 Ah.  Well, then, you probably want to set "use_from" and "alternates"
 in your .muttrc so that mutt will send the reply out as the person to
 whom it was addressed.  Give it a shot.
 
 


Both set and still no joy. I tried unsetting (commenting out) my defaults
send-hook my_hdr but to no avail. I think I will just for the moment have to
have several commented out my_hdr From lines to suit.

Sean

-- 
GPG ID (DSA) 92B9D0CF PGP2 ID 19592A0D Linux User: #124682  ICQ: 679813
To get my PGP Keys send me an empty email with retrieve as the subject
It said "Needs Windows 95 or better". So I installed Linux...

 PGP signature


Re: Send-Hooks

1999-12-14 Thread Sean Rima

Hi John!

On Tue, 14 Dec 1999, John P . Looney wrote:

 On Tue, Dec 14, 1999 at 02:39:23PM +, Sean Rima mentioned:
  Hi David!
  
  On Tue, 14 Dec 1999, David T-G wrote:
  
   Sean --
   
   If I understand you correctly, you want replies to email sent to your
   yifan account to come from your softhome account, but mutt currently sets
   your from address as yifan when it sees that the email was sent there.
   
   If that's correct, then I believe you want to unset "use_from", and you
   might also want to specify a "my_hdr From" command to force a particular
   address.
   
   
  
  No the other way around. If a mail comes in addressed to
  [EMAIL PROTECTED], I want Mutt to set the reply as coming from
  [EMAIL PROTECTED] Currently it sets all mail to From:
  [EMAIL PROTECTED]
 
  I've in my .muttrc:
 
 send-hook . my_hdr reply-to: [EMAIL PROTECTED]
 send-hook . my_hdr From: John P. Looney [EMAIL PROTECTED]
 send-hook ilug my_hdr From: [EMAIL PROTECTED]
 send-hook ilug my_hdr Reply-to: [EMAIL PROTECTED]
 send-hook [EMAIL PROTECTED] my_hdr From: [EMAIL PROTECTED]
 send-hook compapp.dcu.ie my_hdr reply-to: [EMAIL PROTECTED]
 send-hook compapp.dcu.ie my_hdr From: John P. Looney [EMAIL PROTECTED]
 send-hook online.ie my_hdr From: John P. Looney [EMAIL PROTECTED]
 send-hook online.ie my_hdr Reply-to: [EMAIL PROTECTED]
 
  I've loads more, but you get the idea...
 

I have these set for mailing lists etc, but if someone writes me direct, my
default email address may not be the one he/she wrote to and I don't want to
confuse anyone :)

Sean

-- 
GPG ID (DSA) 92B9D0CF PGP2 ID 19592A0D Linux User: #124682  ICQ: 679813
To get my PGP Keys send me an empty email with retrieve as the subject
It said "Needs Windows 95 or better". So I installed Linux...

 PGP signature


Send-Hooks

1999-12-13 Thread Sean Rima

Hi folks,

I have a strange problem, I use this mailbox for several different
forwarding addresses and I am wondering if I can configure Mutt to use the
original To address instead of the default.

Mutt is set to use thecivvie@(softhome.net|yifan.net...) and so if someone
sends me and email using my Yifan.net account that Mutt replies using the
Yifan.net as the from address instead of the softhome.net one.

Any suggestions, as I played around with Send-hooks. Using 1.1.1i

Sean
-- 
GPG ID (DSA) 92B9D0CF PGP2 ID 19592A0D Linux User: #124682  ICQ: 679813
To get my PGP Keys send me an empty email with retrieve as the subject
It said "Needs Windows 95 or better". So I installed Linux...

 PGP signature


Re: send-hooks

1999-09-19 Thread Stefan Troeger

Hi,

On Sun, Sep 19, 1999 at 17:16 +0200, Moritz Schulte wrote:

 ok, i´ve a question about send-hooks:
 is there a possibilitie to let send-hooks affect only this one mail?
 an exmaple:
 pgp_autoencrypt is unset and i want mails to one andress get
 encrypted.
 if i set "pgp_autoencrypt" via a send-hook to this adress, this mail
 gets autoencrypted fine. but, and thats the problem, this "set
 autoencrypt" doesnt affect only this mail. all following mails to
 other adresses are getting encrypted to.

Use something like

send-hook .   unset pgp_autoencrypt
send-hook that one address here set   pgp_autoencrypt

to unset pgp_autoencrypt for every mail except mail to that one
address.

Ciao,
Stefan



send-hooks - cruel

1999-06-25 Thread Anonymous

Hi

Many months of fiddling and I have not managed to get send-hooks to work.

Here is my muttrc - can you see why?


#send-hook '~A'  'my_hdr From: Mutt User user@winkle'
send-hook '~A'  'my_hdr Subject: THIS IS VERY IMPORTANT'
#send-hook . 'my_hdr From: [EMAIL PROTECTED]'
#send-hook eric "signature='test signature'

set folder=~/Mail   # where i keep my mailboxes
set visual="vim -s /tmp/ii -c '2/To'"
#set abort_unmodified=yes   # automatically abort replies if I don't
# change the message
#set alias_file=~/.mail_aliases # where I keep my aliases
#set allow_8bit # never do Q-P encoding on legal 8-bit chars
#set arrow_cursor   # use - instead of hiliting the whole line
set ascii_chars # use ASCII instead of ACS chars for threads
unset abort_unmodified
set attribution="And on %d it was said by %n:"  # how to attribute replies
set autoedit# go to the editor right away when composing
set auto_tag# always operate on tagged messages
set charset="iso-8859-1"# character set for your terminal !!
set noconfirmappend # don't ask me if i want to append to mailboxes
#set confirmcreate  # prompt when creating new files
set copy=yes# always save a copy of outgoing messages
set delete=yes  # purge deleted messages without asking
set edit_hdrs   # let me edit the message header when composing
set editor="vim -c 'set tw=75' -c 'syntax on' -s ~/bin/A"
set fast_reply  # skip initial prompts when replying
#set fcc_attach # keep attachments in copies of sent messages?
#set force_name # fcc by recipient, create if mailbox doesn't exist
#set forw_decode# weed and MIME decode forwaded messages
#set forw_format="[%a: %s]" # subject to use when forwarding messages
#set forw_quote # quote the header and body of forward msgs
#set hdr_format="%4C %Z %{%m/%d} [%2N] %-15.15F (%4c) %s"
set hdr_format="%4C %Z %{%m/%d} %-15.15F (%4c) %s" # format of the index
set hdrs# include `my_hdr' lines in outgoing messages
#set header # include message header when replying
set help# show the help lines
set history=200 # number of lines of history to remember
set hostname="fruitcom.com" # my DNS domain
set include # always include messages when replying
set indent_str="  ] "   # how to quote replied text
#set locale="C" # locale to use for printing time
set mailcap_path="~/.mailcap:/usr/local/share/mailcap"
#set nomark_old # i don't care about whether a message is old
set mail_check=4# how often to poll for new mail
#set mbox=+mbox # where to store read messages
#set menu_scroll# no implicit next-page/prev-page
#set metoo  # remove my address when replying
set mime_fwd# use message/rfc822 type to forward messages
set move=no # don't ask about moving messages, just do it
set nomove
#set pager=less # some people prefer an external pager
#set pager_context=3# no. of lines of context to give when scrolling
#set pager_format="-%S- %-20.20f %s"# format of the pager status bar
set pager_index_lines=12# how many index lines to show in the pager 
WAS SIX
set pager_stop  # don't move to the next message on next-page
#set pgp_strict_enc # use Q-P encoding when needed for PGP
set postponed=+postponed# mailbox to store postponed messages in
set print=yes   # ask me if I really want to print messages # Eric changed yes 
to no
set print_command="lpr -oc|fmt -s"  # He likes to save trees, he says
set noprompt_after  # ask me for a command after the external pager exits
set quote_regexp="^ *[a-zA-Z]*[:#}]"   # how to catch quoted text
set read_inc=25 # show progress when reading a mailbox
#set recall # prompt to recall postponed messages
set record=+sent# default location to save outgoing mail
set reply_to# always use reply-to if present
set reply_regexp="^(re:[ \t]*)+"# how to identify replies in the subject:
#set resolve# move to the next message when an action is performed
#set reverse_alias  # attempt to look up my names for people
set reverse_name# use my address as it appears in the message
# i am replying to
set nosave_empty# remove files when no messages are left
set save_name  

Re: send-hooks - cruel

1999-06-25 Thread Anonymous

Eric Smith [EMAIL PROTECTED] wrote:

  In what way do they fail to work?
 
 Well, they do not set the headers or whatever, they just do not have
 any effect.

The only un-commented send-hook in the huge muttrc file you sent was one
that tries to set the subject header.  I believe there is a limitation
that the subject cannot be set by send-hooks.  But any other header
should be settable.

 I need to change the "From:" in a scripted mail out that I do with
 perl.

Why use Mutt?  Why not simply format your headers the way you want them
to be, in your script, and then send the result directly to "sendmail -t"?

open(MAIL, "|/usr/lib/sendmail -t");

print MAIL "From: Bogus User bogus\@example.com\n";
print MAIL "To: Another User another\@example.com\n";
print MAIL "Subject: This is very important\n";
print MAIL "\n";
print MAIL "This is my message to you.\n";

close(MAIL);

If you don't want the recipients to show in the headers, don't use
sendmail's -t flag; instead put the users on the command line:

@recipients = ( "bogus\@example.com", "another\@example.com" );

open(MAIL, "|/usr/lib/sendmail @recipients");

print MAIL "From: Bogus User bogus\@example.com\n";
print MAIL "To: undisclosed-recipients:;\n";
print MAIL "Subject: This is very important\n";
print MAIL "\n";
print MAIL "This is my message to you.\n";

close(MAIL);

 It would be nice to get the hooks to work though.

Try "send-hook ~A 'my_hdr X-My-Header: blah'" and I think you will see
that send-hooks do work.

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



Using autoedit with send-hooks ?

1999-06-09 Thread James FitzGibbon

I use the autoedit feature of Mutt, and have found that it's incompatible
with using send-hooks.  Since mutt doesn't prompt you for a recipient when
autoedit is turned on, the send-hook never activates.

I realize that this falls under the note in the documentation for send-hook,
but having used autoedit for a number of months, I don't relish having to
retrain myself to put in the recipient and subject before I get into my
editor.

Is there any way to get the best of both worlds here ?

-- 
j.

James FitzGibbon (JF647)[EMAIL PROTECTED]
EHLO Solutions   Voice/Fax +1 416 410-0100



backslashes in send-hooks

1999-01-03 Thread Greg Matheson


Why do I need to put two backslashes before the '+' in the first
regexp, but only one before the '.' in the second? 

send-hook '~t ^lang\\+moo' 'my_hdr From: Mr Bean lang@ms\.chinmin\.edu\.tw'

I have a mailing list set up at a box in my email address and I
want to change my From: line for emails to that email+box
address. 

The above send-hook works. I am just interested in the reason why
only one backslash didn't work.

-- 
Greg Matheson   Make a mistake
Chinmin College, Taiwan Try it, you'll like it
[EMAIL PROTECTED]