[Gllug] mutt question

Pete Ryland pdr at pdr.cx
Tue Apr 16 22:13:35 UTC 2002


On Tue, Apr 16, 2002 at 12:38:52PM +0100, Vincent AE Scott wrote:
> is there any way for mutt to display a list of subscribed mailboxes,
> with a count of how many new/unread messages are in each?

Yes.

With a procmail containing something like:

# MOST LISTS - Automagically handle lists
:0
* ^((List-Id|X-(Mailing-)?List):(.*[<]\/[^>]*))
{ 
        LISTID=$MATCH
  
        :0:
        * LISTID ?? ^\/[^@\.]*
        IN.$MATCH
}

# MAJORDOMO - Automagically handle Majordomo lists
:0
* ^Sender: owner-[^@]+@[^@\+]+
* ^Sender: owner-\/[^@\+]+
{
   :0:
   IN.$MATCH
}

# Other lists
:0
* ^Sender: [^-@]+-(list-)?owner@[^@\+]+
* ^Sender: \/[^-@]+(-list)?
{
   :0:
   IN.$MATCH
}

then in your mutt config, try:

mailboxes `find ~/.mutt/Mail/IN* -printf "%p "`
macro   index   <left>  ":mailboxes \`find ~/.mutt/Mail/IN* -printf \"%p
\"\`\nc?<toggle-mailboxes>"  "Regenerate & View Mailboxes"
lists ...
set folder_format="%3C %t%N %f%> %d %10s %F %u/%g "
set index_format="%(!%d/%m) %-12.12u %Z %2M %s%> (%4c)"
folder-hook  .    "set sort = threads"
folder-hook  .    "set sort_aux = date"
folder-hook  .    "set index_format='%(!%d/%m) %-12.12u %Z %2M %s%> (%4c)'"
folder-hook  .    "exec collapse-all"
folder-hook  .    "set strict_threads=no"
folder-hook  Sent "set strict_threads=yes"
folder-hook  Sent "set index_format='%(!%d/%m) %-12.12O %2M %s%> (%4c)'"
folder-hook  Sent "set sort = threads"
folder-hook  Sent "set sort_aux = reverse-date"
folder-hook  IN$  "set strict_threads=yes"

and then press the left arrow key in index mode to get to "folder mode"
which will contain a list of your list mailboxen.  It won't tell you then
number of messages, but will give you the size of the file.

For good measure, I've also thrown in my latest cool mutt config discovery
which is the "exec collapse-all" and index_format stuff above.

hth,
Pete


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list