procmail
[Top] [All Lists]

Re: Changing Subject Header

1997-04-07 16:28:00
Lista da Horda <lista(_at_)horda(_dot_)com> writes:
How Can I capture and change the subject of an email?

Using \/ and formail


I Want to do this because I'm subscribed to many discussion lists, so
depending from whrere the email is from it would be renamed so it would be
easier to organize them.

Example:
I receive an email from procmail list from 
anyone(_at_)somewhere(_dot_)over(_dot_)the(_dot_)rainbow
with the subject: What's up doc?

Then I want to change the subject to : [PROCMAIL] What's up doc?


Isn't this what folders are for?  If you intend to become a active
participant on the list, then I would like to dissuade you from this
path.  In particular, subject lines that look like that are kind of
annoying for the rest of us, as it a) tells us nothing we didn't
already know, and b) pushes the real subject that much further off the
screen.  So if you do decide to do this, please remove the addition
from the Subject: line when you post.  Okay, enough preaching...


        :0 fh
        * ^(Return-Path:|From |Resent-Sender:) *\
                        
<?procmail-request(_at_)Informatik(_dot_)RWTH-Aachen(_dot_)DE
        * ^Subject: \/.*
        |formail -I"Subject: [PROCMAIL] $MATCH"


The first condition should be whatever you use to recognize messages from
the list.  The one I included above should work just fine.  The second
condition uses the "\/" token to extract the value of the Subject: header,
while the formail command inserts the new value.

BTW: can you trim your .sig when posting to the list?  I'd guess that few
on the list are interested in the Brazilian ISP for whom you work.  After
all, we're here for your procmail problems/comments/ideas.

Philip Guenther

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