Hi there,
Thanks a lot guys. The recipie worked just fine. I really
appreciate your time and comments.
Rupinder Gill
From: "David W. Tamkin" <dattier(_at_)ripco(_dot_)com>
To: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE (Procmail Mailing List)
Subject: adding a footer and forwarding (as changing the subject and
forwarding)
Date: Fri, 18 Aug 2000 13:31:38 -0500 (CDT)
Matt Dunford answered Rupinder Singh Gill,
| Hmmm, this is not one of my strong points.
You seem strong enough.
| # 'fb' -- filter body of message
| :0fb
| * ^Subject:.*test
| | (cat -; cat /path/to/footer/file)
|
| # if previous recipe succeeded, forward message
| :0A
| ! c(_at_)hostname(_dot_)com
One improvement and one correction: change the action of the first recipe
to
| cat - /path/to/footer/file
that way procmail will invoke cat directly instead of invoking a shell that
in turn has to run cat twice.
This will also work:
| sed '$ r /path/to/footer/file'
but in most OSes sed is a bigger program to fork than cat and, since sed
would have to keep checking for end-of-file at every newline, it would
probably run more slowly than cat for this particular operation.
Now the correction: the capital-A flag means (approximately) "if the
previous
recipe [actually, the most recent recipe that had neither an `A' nor an `a'
flag] *ran*." If you want to run a recipe only if the previous one *suc-
ceeded*, it's the lower-case-a flag.
As to which to use here, that depends on what Rupinder would want to do if
a message came that was supposed to get the footer but for some reason the
footer didn't get added.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail