<<< Date Index >>>     <<< Thread Index >>>

Re: Poll all subfolders from an IMAP-Inbox



On Tuesday, 19 December 2006 at 21:24:41 EST,
   Travis H. (<travis+ml-mutt@xxxxxxxxxxxxxxxxx>) wrote:
> On Fri, Dec 15, 2006 at 10:33:53PM +0100, Matthias Bode wrote:
> > how can I poll all subfolders of my inbox for new messages in mutt? I
> > know that there is the "mailboxes +INBOX.Spam +INBOX" possibility, but I
> > have nearly 40 Subfolders and writing them all down is a bit anoying.
> 
> How about something like:
> 
> mailboxes `find ~/Maildir/INBOX -type d -print | sed -e "s/^/+\'/" -e "s/$/\' 
> /"`

Presumably, if he's got an IMAP server (as per the subject) then running
find locally wouldn't be a possibility.  An equivalent command, if you
can install the perl Net::IMAP::Simple module, is something like:

mailboxes `perl -MNet::IMAP::Simple -e '
   $server = new Net::IMAP::Simple("imap.server.com");
   $server->login("username","password");
   print join (" ", $server->mailboxes), "\n";
'`

, although that returns all mailboxes vs. just subfolders of INBOX (and
which I broke up onto multiple lines for readability, which probably
won't work in your muttrc).

-- Sweth.

-- 
Sweth Chandramouli - http://EthicalHomes.com/
Are you curious about whether you could afford to buy a home, but not ready
to talk to a lender just yet?  I'd be glad to do a free, no-obligation
consultation with you to help you learn what your options are.