Re: Howto know number of messages in all mbox ?
On 2005-11-17, Didier BRETIN <didier@xxxxxxxxxx> wrote:
> Hello,
>
> Is there a way, with or without mutt, to know the number of new mails in all
> my mailboxes, mailbox by mailbox ? What I would like is to have for example:
>
> 18 inbox
> 5 mutt-users
> 7 rails-spinoffs
>
> If there is no direct command to have this, perharps I can use some python
> or perl script to parse a mailbox and then found the new messages ? Where is
> recorded the state of an e-mail ?
>
> If someone can help me with theses questions, I would be happy ;).
Mutt records the state of a message in the Status: header, so the
number of new messages in a mailbox is the number of messages that
do not contain the Status: header. Therefore, this command should
do what you want:
grepmail -rhv 'Status:' ~/Mail/Incoming/*
where you can replace "~/Mail/Incoming/*" with a list of your
mailboxes. Check Google to see where you can find a copy of
grepmail--it's a really useful tool.
HTH,
Gary
--
Gary Johnson | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA