Subject: re:

From: J T Breitner <[email-masked]>
Date: Mon, 27 Nov 2000 00:21:12 EST

On Sun, 26 Nov 2000 10:56:06 -0800 (PST), Mark Crispin [email-masked]
wrote:

> On Sun, 26 Nov 2000 11:35:01 EST, J T Breitner wrote:
> > If imap-2000 attempts to open a mailbox with no messages and no
> > "prefixing" mail message in the box (otherwise a zero-byte file), mail_open
> > appears to return null.
> 
> What do you mean by "return null"?
> 
> c-client should return an open mailstream with zero messages.  If it does not,
> are you running a modified version of c-client?  Have you deleted any drivers?
> 

I am running a modified version, but it's one that only points the mail folders
to their "home"/mail directories (as in /usr/people/<username>/mail).

I have not modified any drivers.

Here's what I'm doing that returns the null:

...

if((stream=mail_open(NIL,_thispath,NIL)) == NIL){
    return(0);
}

...

The function attempts to open up a stream to _thispath.
If it has the prefix message in there, it's happy.  If it's
a zero-byte file, it'll return NIL.  My error-trapping sees it and says "ooops,
you can't open that mailbox".

I've recreated this on both Irix 6.2 and Linux RH 6.2.

In some tests this afternoon, mtest reports back that it's a "dummy mailbox" with
zero messages.  When I get some time Monday, I'll pick apart mtest and see what
you're doing there at that condition.  That might point me in the right direction. 
If not, well, you'll probably be among the first to know.

---

From: Mark Crispin <[email-masked]>
Date: Sun, 26 Nov 2000 20:16:49 -0800 (PST)

If mtest reports "dummy mailbox" and your application does not, do you have a
proper
	#include <c-client/linkage.c>
at the start of your main program?  This is *NOT* optional.