diozaka.org

abc fed ghi lkj mno rqp stu xwv yz.

Visit my Blog!

mailcount

Have you ever wanted a simple tool to count the messages in your maildir folder? Here it is: mailcount! You can specify which messages you want to see in the output (new, flagged, seen, ...) and use a self-defined format for displaying the numbers! That way, you can always have an eye on your favorite means of communication. ;)

Download

Install

$ make mailcount
$ su -c "cp mailcount /usr/local/bin/"

Usage

Notice: The order of the parameters has changed from version 0.1 to version 0.2!

mailcount FORMAT FOLDER1 [FOLDER2 [...]]

Format flags

D
drafts
F
flagged messages
N
new messages
O
old messages (not new but not seen yet)
P
passed messages (resent/forwarded/bounced)
R
replied messages
S
seen messages
T
trashed messages
X
total number of messages

Examples

$ mailcount "X(N)[F]" ~/mail/inbox/
7(2)[1]

The output says: 7 messages total, 2 new, 1 flagged (muttng style)

$ mailcount N ~/mail/inbox/ ~/mail/spam/
14

Sums up the new messages from the inbox and the spam folder.

Copyright (c) 2005-2010 diozaka / Erik Scharwaechter <erik@diozaka.org>