mail_valid() on ~/mbox will not return a driver type of mbox. It won't onI didn't explain myself carefully - mail_valid("INBOX") should return DRIVER*drv, if it is using mbox then drv->name=="mbox".
mbox, or /homedir/mbox, or any of the other names either.
You're not setting Pine's inbox-path to "mbox" are you? Haven't you
noticed that mail isn't being transferred from the spool file?
First, you seem not to be aware of how pine and imapd are being distributed with many operating systems. Most linuxes build and distribute them separately - they are therefore not using exactly the same code base and there are no shared libraries involved so you can build pine and imap separately in any way you prefer.
Now, about the setup. pine is essentially unchanged and no, inbox-path is not set to mbox (please have some faith...). The issue here is that the system is for both interactive login use and allows imap access. Some people use pine, some imap, some both, and some something third. They all have million files and do not want a closed imap server but /var/spool/mail kind of access+procmail. Now, so far I've had essentially unmodified imapd that offers folders under home dir - ~. That has proved to be a big pain. Not only will the imapd offer every single file as a folder but will do so with hidden (.*) files (I know how to turn it off), will easily get confused by symlinks pointing back to subdirs (as many window managers might do) and let me not begin listing broken imap clients e.g. the ones that assume they should subscribe to *every* folder - hence every file in users homedir. Yes, nothing in imapd is really to blame - if everyone wrote imap client like it is in pine we wouldn't have issues at all, but I have to live with everything from eudora to outlook.
So the solution is to set mail-subdirectory to mail to simplify imap users (and my) life and it also makes it easier for many of my pine users that do not care exactly where their folders are to find them in an imap client. Remember, goal here is to make it easy on the user and do away with instructions on how to setup mail subdir prefix manually in various clients (which are not read until it's too late).
Once you set the mail-subdirectory to mail that means that imap server will not see anymore ~/mbox as it is now looking for ~/mail/mbox and that's the problem. I can't easily get rid of mbox files hence the change.
Now that I think about it, I find it slightly non consistent for pine to expect folders to be in mail/ and imapd in ~/ and this is essentially what I am addressing - once you make them expect folders in same location, mbox driver is broken without changes I was mentioning (teaching mailboxfile not to translate ~/mbox into ~/mail/mbox *only* for imapd).
Josko P.
