procmail
[Top] [All Lists]

Re: total number of messages with mailstat

1997-05-14 14:29:00

Check out my web page for ProcLog (www.pobox.com/~aturner/proclog).  The
current version of ProcLog gives email/folder, total emails, # of new
emails since last checked, and the size of Procmail log file.  There's
many more features, but I won't go into it here.  (BTW, the web page says
"beta" but I'm in the process of re-releasing the same as 1.0 "gold".)

Here's a sample output:

Scanning log file for new mail in folders...
You now have 7 total new mail in folders.
INBOX-1-2-3-4-5-6- 
You have: 
1:        2 in INBOX-Enlightenment.
3:        3 in INBOX-spamguard.
4:        2 in INBOX-procmail.
6:        1 in INBOX-Christina.
        ______________________
          8 total logged emails.
 
Last time you had 1 total email(s).
The size of the Procmail log file is 34K.

------------------------------------------------------------------

I'm also currently working on version 2.0 which adds size of each folder,
size of all email, number of new emails/folder.  Also since it is being
ported to Perl is faster.  Should be out sometime next week I hope.

Here's an actual output of 2.0 Alpha:

Scanning log file for new mail in folders...
You have 5 new mail in folders.

 ID   New  Total              Inbox Name         Size in K
------------------------------------------------------------
 1      2     19      INBOX-Enlightenment               48
 2      0     15      INBOX-mustang                     31
 3      1      1      INBOX-spamguard                    3
 4      2     24      INBOX-procmail                    77
 6      0      1      INBOX-Christina                    1
 9      0      1      INBOX-jokes                        3
 10     0      1      INBOX-hacker                      28
------------------------------------------------------------
 62 total email taking 193 K.
 The size of the Procmail log file is 8 K.

If you have anymore questions let me know!

Aaron Turner, CNE      | Finger me for my PGP key   | Unix, Perl & Bash Hacker
aturner(_at_)pobox(_dot_)com      | Either which way,          | Comp. Eng. 
Major @ SJSU
www.pobox.com/~aturner | one half dozen or another. | Mustang lover, M$ hater

On Wed, 14 May 1997, Wotan wrote:

On Wed, 14 May 1997, Burnt Norton wrote:

Has anyone hacked `mailstat' to calculate and display the total number of
messages received by procmail in a given logfile?

goblin$ mailstat -k Mail/procmail.log
 
  Total  Number Folder
  -----  ------ ------
   2133       1 /home/bnorton/incoming/lists/ufo-l
  17621       7 /home/bnorton/incoming/lists/amanda
  10445       4 /usr/mail/bnorton

This is the default output.  I'm looking for a change that will add the 
values in the "Number" column to give a grand total of messages.

There is a perl script called procparse that might suit your needs.  Gives
ouput like this:

 10:19am netcom23:~>  procparse .procmail/log

        procmail log summary
        --------------------

From: Wed May 14  9:12:37 US/Arizona 1997
To:   Wed May 14 10:07:35 US/Arizona 1997

Messages     %    Size (K)     %     Mailbox
--------   ----   --------   ----    -------
       5  100.0        5.8  100.0    /u9/wotan/.mailbox/inbox
--------   ----   --------   ----    -------
       5  100.0        5.8  100.0    1



-- 
Jesus Saves,
Moses Invests,
But only Buddha pays Dividends.


<Prev in Thread] Current Thread [Next in Thread>