procmail
[Top] [All Lists]

RE: How to forward an email and change the Subject by using procm ail?

2000-08-18 11:29:33
well, then you would need to get the subject saved in the $MATCH var.
This can be done using the '\/' in your conditions.

:0fh
* Subject: \/.*
| formail -I "Subject: Important: $MATCH"

:0A
! c(_at_)myhostname(_dot_)com


On Fri, 18 Aug 2000, Yeh, Paul     1047 wrote:

Thanks. It works fine. But I want to keep my original Subject and add
a few words before it.

For example, if the email subject is "$SUBJECT", I want my new subject
like this "Important: $SUBJECT". Of course $SUBJECT is different email by
email.

Thanks,

Paul

-----Original Message-----
From: Matt Dunford [mailto:matt(_at_)stary(_dot_)zoomedia(_dot_)com]
Sent: Thursday, August 17, 2000 4:55 PM
To: Yeh, Paul 1047
Cc: 'procmail(_at_)informatik(_dot_)RWTH-Aachen(_dot_)de'
Subject: RE: How to forward an email and change the Subject by using
procmail?


Read 'man formail' for more info on formail.
Check out the faqs linked from www.procmail.org.

# (untested, of course!)
# f -- use pipe as filter
# h -- filter header info (in this case you're 
# changing the Subject header)
:0fh
* Subject:.*test
| formail -I 'Subject: Pls ignore: test'

# A -- if previous recipe succeeds
# forward message with altered Subject
:0A
! c(_at_)myhostname(_dot_)com


On Thu, 17 Aug 2000, Yeh, Paul     1047 wrote:

Thanks.
Because I jsut start learning procmail. Can you give me some dtails?

If the Subject is "test", I want to foward this email to 
"c(_at_)myhostanme(_dot_)com"
and change the Subject to "Pls ignore: test". How to do that?
Pls give me the detail recipe.

Thanks very mich,

Paul

-----Original Message-----
From: Lee Howard [mailto:faxguy(_at_)deanox(_dot_)com]
Sent: Thursday, August 17, 2000 3:19 PM
To: Yeh, Paul 1047; 'procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE'
Subject: Re: How to forward an email and change the Subject by using
procmail?


Use formail in a recipe that catches that particular mail.

Lee Howard

At 03:10 PM 8/17/00 -0700, Yeh, Paul     1047 wrote:
    want to send email to user C through user B. 
And add a new line to that email message. 
  
How should I do with the ~B/.procmailrc file to 
add a new line either in the subject or in the mail body and 
then send to user C? 
  
Thanks, 
  
Paul    




_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>