Subject: How to get a list of folders/newsgroups?

From: Karsten Ballueder <[email-masked]>
Date: Tue, 6 Jul 1999 13:02:47 +0100 (BST)

Hello,

I'm trying to obtain a listing of remote folders or
newsgroups on an IMAP/NNTP server.
I've found the mail_list() and mail_lsub() calls, but they
both take a mailstream argument. For IMAP, this is not
problem, I can just open one with the default INBOX, I
suppose, but how can I obtain a list of newsgroups on the
remote NNTP server?
My attempts to do any such things with the mtest sample have
failed. I tried the folder {nntpserver/nntp} without a
newsgroup name, hoping to be able to use this, but it
doesn't work.

So I wonder what's the correct way to obtain such listings?

--
 Karsten Ballüder  http://Ballueder.home.dhs.org/  mailto:[email-masked]
 Physics Department, Heriot-Watt University, Edinburgh, EH14 4AS, Scotland
                     Tel. +44-(0)-131-4513068  Fax. +44-(0)-131-4513136
            "In a world without fences, who needs Gates?"  

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Tue, 6 Jul 1999 09:58:58 -0700 (PDT)

On Tue, 6 Jul 1999 13:02:47 +0100 (BST), Karsten Ballueder wrote:
> both take a mailstream argument.

The mailstream can either be an already-open stream to the desired server and
protocol or it can be NIL and c-client will open a temporary stream.  You may
find that half-open streams are useful.

Note that mail_lsub() only needs a mailstream for IMAP subscription listing.
For NNTP, the local .newsrc file is used.

In both mail_list() and mail_lsub(), you need to include the {host}
specification in your wildcard request.  For example, the following will list
all newsgroups at nntpserver.foo.com:
	mail_list (NIL,NIL,"{nntpserver.foo.com/nntp}*");