On Thu, Jun 22, 2000 at 09:56:38AM +0300, Mikko Hänninen wrote:

> > ## Nuke duplicate messages
> > :0 Wh: msgid.lock
> > | formail -D 8192 msgid.cache
> > 
> > ## Create backup cache of 100 most recent messages
> > :0 c
> > backup
> >   :0 ic
> >   | cd $PMDIR && rm -f dummy `ls -t msg.* | sed -e 1,100d`
> 
> That won't work, unless $PMDIR contains "backup".  The "backup"
> from the first part there, and the $PMDIR in the second part,
> should be the same name.  And that name should be a directory.

Hmmm... ok...  backup was actually a mailbox file, so I deleted it
and made a directory named backup and changed $PMDIR to
$PMDIR/backup.

> > But it doesn't seem to be working properly (the backup part).  I've
> > got something like over 1000 messages in there now but I only want to
> > save the last 100.  Can someone tell me what I'm doing wrong?
> 
> Have those messages already passed through procmail with that duplicate
> filtering recipe once?  If so, any subsequent run will make them go to
> /dev/null because they'll be seen as duplicates.
> 
> If that's the case, two ways around it:
> 1) put the backup rule *before* the duplicate filtering rule
> 2) remove the msgid.cache file, or use something different (maybe only
> for this one run only)

Ok, I put the backup first and hten the dupe filtering rule, so the
backup will be made prior to the dupe filtering.

> Finally, make sure that "backup" is a directory, fix that $PMDIR thing
> (if it needs fixing), and it should work.  The messages will be stored
> in the backup dir, with names like msg.000, msg.001, etc.  The numbers
> will be in order, although I don't remember if latest is .000 or .099.
> (Or it will work something like that...)

Cool.  Now I just need some new mail to try it out... =)  Thanks,
Mikko.

-- 
[EMAIL PROTECTED], OpenPGP key available on www.keyserver.net
Freezer Burn BBS:  telnet://bbs.freezer-burn.org . ICQ: 54924721
Webmaster for the Linux Portal Site Freezer Burn:  http://www.freezer-burn.org

Current Linux uptime: 2 days 13 hrs and 47 mins.

Reply via email to