procmail
[Top] [All Lists]

MATCH operator and subject adjustment

2001-11-11 09:06:51
This may be another case of not having pounded theh Docs enough but
the sections on MATCH in man procmailex and promailrc, just don't give
enough of an example or description for an ignoramous to catch on to.

Seems MATCH is generally used to extract information, and only
secondary for inserting it.  I want to take advantage of both usages
but couldn't assemble the syntax needed from the man pages.

My aim is to have procmail find a specific "^Subject: " line
and insert the current date in a specific format into the existing
subject line. 

Maybe MATCH isn't the tool for this and its something formail can do
with no help...

So in brief when procmail sees:

   0:
  * ^Subject: Notification about blab blab 
  * ^From: (_dot_)*user(_at_)specific(_dot_)com
 
I want procmail to add the current date to the subject line and send
it on to me at a remote site.

I currently have a rule that intercepts mail to my account on a remote
host and sends it to me at another account, but adds a specific header
to make it easy to identify, so I can easily tell this mail was
fromwarded from that remote host.

This Subject addition thing is needed on that same machine so I
wondered if it can be worked into the same code:

     :0
     | formail -I "X-Delivered-Via: reader(_at_)somewhere(_dot_)com" \
         | $SENDMAIL $SENDMAILFLAGS reader(_at_)somewhere(_dot_)else(_dot_)com

How can I combine this rule with code that inserts the date into
existing subject line?
_______________________________________________
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>