procmail
[Top] [All Lists]

Re: pruning mbox's based on number of messages?

1999-12-11 12:54:03

On Dec 11, 11:12am, Dallman Ross wrote:
Subject: Re:  pruning mbox's based on number of messages?
From: gary(_at_)Intrepid(_dot_)Com (Gary Funck)

But this still leaves the question: how many messages are in
the mailbox?  So far, I've thought of two approaches:

I'll leave it to others to debate the feasibility of your
proposed approach to the problem.  But I thought I'd point
out one possibly useful way to count messages as being
the "messages" command.  It's part of the elm package, but
works independently and is usually in a standard path if
it's on your server.

Thanks, Dallman.  It is a good idea.  Turns out though that
"messages" is a shell script, which ultimately does the
following:

    mcount=`egrep -c "^From " $fname`

which uses grep on '^From ' to get the message count.  I think
this isn't exactly right from a MIME-compliance point of view.
Maybe someone will help to clarify this point.