Vincent Danen <[EMAIL PROTECTED]> wrote on Wed, 21 Jun 2000:
> ## 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.

> 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)

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...)


Regards,
Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
This sentence contains ten words, eighteen syllables, and sixty-four letters.

Reply via email to