Dave Runkle <d(_at_)tradesol(_dot_)com> writes:
...
The problem is that the formail line does a Replace rather than
just inserting the word. Is this all I can do? I'd like to put the string
[COPY] at the beginning (or even the end) of the subject line, but
all it does is replace the whole line.
Umm, last time I checked, if you replace some text with itself plus
something else, it looks like you inserted the something else. I.e.,
just change your second recipe to the following:
:0fhw
* ^Subject: ?\/.*
| formail -I "Subject: [COPY] $MATCH"
As a subnote, the above leaves you with no subject line at all if there
wasn't one to begin with. This generally isn't a problem, as sendmail
forces there to be a subject line, creating a blank one if there wasn't
one to begin with. This recipe will change that into a subject containing
just the word "[COPY]".
Philip Guenther
----------------------------------------------------------------
Philip Guenther UNIX Systems and Network Administrator
Internet: guenther(_at_)gac(_dot_)edu Phonenet: (507) 933-7596
Gustavus Adolphus College St. Peter, MN 56082-1498
Source code never lies (it just misleads). (Programming by Purloined Letter?)