Subject: Trn elm suggestion. mbox.saver hack.

From: Robert Nicholson <[email-masked]>
Date: Fri, 18 Mar 94 22:32:18 GMT

I archive my news in unix mail folders from trn using the macro.

:S)     %(%m=[ap]?s ~/Mail/%C

Now that I've changed elm so that it supports 'N' status I thought I'd
share this with you.

If I save a message to a folder, specifically a news folder then I
don't want to regard that message as New.

So I've changed things a bit.

In mbox.saver...

  /usr/ucb/tail +$5c $1 | /bin/sed "s/^From />From /" 

I changed this line to

 /usr/ucb/tail +$5c $1 | /bin/sed "s/^From />From /" | /usr/local/bin/formail -a "Status: RO"

formail is a utility that comes with the excellent procmail mail
filtering package.  One of the many things it allows me to do is add a
custom header to a message.

If you have a sed rule to do this I'd like to hear it, just for the sake of
it.  I'm ok with substitutions but the man page doesn't realy help
when you want to add text to an input stream in a specific location.

I assume it's something like

sed '/^\n/aStatus: RO/' or something like that I'm no good with
double barrel sed lines.

---

From: [email-masked] (Stephen R. van den Berg)
Date: Thu, 31 Mar 1994 16:58:27 +0200

Robert Nicholson <[email-masked]> wrote:
>Robert Nicholson wrote:
>Folks, this should have been 

>>  /usr/ucb/tail +$5c $1 | /bin/sed "s/^From />From /" | /usr/local/bin/formail -fI "Status: RO"

Then again, formail already does the "From " to ">From " conversion (at least,
if not given the -b option).

So, I think this can be simplified to:

 /usr/ucb/tail +$5c $1 | /usr/local/bin/formail -fI "Status: RO"

-- 
Sincerely,                                  [email-masked]
           Stephen R. van den Berg (AKA BuGless).
"I hate spinach, and I'm glad that I hate it, because if I wouldn't hate it,
 I would have to eat it, and I hate it!"