 | | From: | Bella Dona | | Subject: | When using mutt from the comand line send-hook is not working | | Date: | 24 Dec 2004 08:58:51 -0800 |
|
|
 | Please can you help me with following:
1. I have mutt (version 1.4.2.1i) installed on RH 7.3 2. I would like to change header (in this case From) based on first characters from the subject field. Here is the excerpt of current .muttrc file: set from="Minnie unmy_hdr From send-hook '~s Frog" 'my_hdr From: Kermit Unfortunately, this works Ok when message is composed and sent from mutt environment (based on my subject From header is changed accordingly). My problem is when I'm using mutt from the command line send-hook is not performed from .muttrc file. Command Example: #mutt mickeymouse@disney.com -s"Frog" I'm planning to use mutt from the command line to send emails to different customers and based on the customer change the sender email address.
Please can you help me with this? Thanks.
|
|
 | | From: | Sven Guckes | | Subject: | Re: When using mutt from the comand line send-hook is not working | | Date: | 24 Dec 2004 17:35:02 GMT |
|
|
 | * Bella Dona [2004-12-24]: > I'm planning to .. send emails to different customers and > based on the customer change the sender email address.
man fastmail
Sven
|
|
 | | From: | Alan Connor | | Subject: | Re: When using mutt from the comand line send-hook is not working | | Date: | Fri, 24 Dec 2004 19:37:14 GMT |
|
|
 | On 24 Dec 2004 08:58:51 -0800, Bella Dona wrote:
> Please can you help me with following: > > 1. I have mutt (version 1.4.2.1i) installed on RH 7.3 2. I > would like to change header (in this case From) based on first > characters from the subject field. Here is the excerpt of > current .muttrc file: set from="Minnie > unmy_hdr From send-hook '~s Frog" 'my_hdr From: Kermit > > > Unfortunately, this works Ok when message is composed and > sent from mutt environment (based on my subject From header > is changed accordingly). My problem is when I'm using mutt > from the command line send-hook is not performed from .muttrc > file. Command Example: #mutt mickeymouse@disney.com -s \ > "Frog" > > I'm planning to use mutt from the command line to send emails > to different customers and based on the customer change the > sender email address. > > > > > Please can you help me with this? Thanks.
Procmail can be used to process outgoing mail too.
:0 * ^Subject.*Frog | (formail -I"From: Kermit ") | $SENDMAIL -t
To use procmail this way you'd need to change the $sendmail variable in your muttrc:
set sendmail="/usr/bin/procmail ~/.procmailrc-outgoing"
If you don't know procmail, see comp.mail.misc.
HTH
AC
|
|