At 07:54 2001-11-11 -0800, Harry Putnam wrote:
This may be another case of not having pounded theh Docs enough but
.. or the list archives. There's always been lots of talk about tweaking
the subject line (such as adding listnames and such, which is the same
principle you're talking about).
How can I combine this rule with code that inserts the date into
existing subject line?
By insert, where do you mean? Beginning or end of complete subject is trivial:
:0fh
* Subject:[ ]*\/[^ ]*.*
| formail -I "Subject: `date` $MATCH"
or a delivery of:
| formail -I "Subject: $MATCH `date`"
Then, to add that to your delivery filter, just add it in...
Note that if the Subject header DOES NOT exist, this won't do a thing. So
you might want to EXTRACT the SUBJECT separatley, so you end up creating a
subject with the date in it if necessary:
:0fh
* Subject:[ ]*\/[^ ]*.*
{
$ORIGSUBJ=$MATCH
}
:0
| formail -I "Subject: `date` $ORIGSUBJ" \
-I "X-Delivered-Via: reader(_at_)somewhere(_dot_)com" \
| $SENDMAIL $SENDMAILFLAGS reader(_at_)somewhere(_dot_)else(_dot_)com
'man date' will give you plenty of options for formatting the date to your
taste.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail