On Sun, 8 Jun 2003, Josko Plazonic wrote: > Isn't it just enough to a) check if name is (something like) ~/mbox and > if so then invoke mail_valid on INBOX and check if the returned DRIVER > is of the type mbox?
No it isn't. mail_valid() on ~/mbox will not return a driver type of mbox. It won't on mbox, or /homedir/mbox, or any of the other names either. ~/mbox is not a particularly likely path in IMAP. mbox is not the only special name that can be an INBOX. mail_valid() is a slow function. > I am (or was, read on) only concerned about normal use. If some genius > decides he wants to subscribe manually to something like > ~/mail/../mail/../mbox - that's his problem. Most imap clients will > just use ~/mbox or mbox (or in unlikely case /homedir/mbox). You've just identified three common forms of non-INBOX mailbox reference and one relatively uncommon one. There are two other more-or-less common forms. Plus the impact of symlinks. This is quite enough reason for me not to want to get into that business. You may or may not accept the validity of the slippery-slope argument; but that's my story and I'm sticking to it. > My real goal was to reconcile imapd and pine concept of where mbox is. > imapd will by default look into ~ for folders, unlike pine which looks > for them in ~/mail dir. Yes, it can be solved by using something like > set mail-subdirectory mail > in c-client.cf but then this breaks mbox driver as it will begin looking > for ~/mail/mbox. One solution is to then disable mbox driver in both > (RedHat way) but I can't do that easily as it is not obvious which > mbox's are pine's and which unix mail's or something third. This is doing a great job of exemplifying my slippery-slope argument... > Another > solution (one I am ashamed of thinking of and why I was trying to hide > mbox) would be to teach pine to look for mbox in ~/mail. Huh? Pine and imapd, built with the same c-client, will look for the mbox file in the same place as long as you use the name INBOX. 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? > Much better is > to change mailboxfile function used in imapd so that if it's asked for > ~/mbox then do not translate that into ~/mail/mbox but just use it as it > is (it also requires changing mbox driver to always use ~/mbox and not > only mbox but that's trivial too). This also prevents display of mbox > in folder list and it is all very easy to do. You've lost me here. I don't have a clue as to why you did this, or how you purport that this solves your problem. Please be sure that you change the version number in both Pine and imapd so that they identify themselves as being hacked versions. I will quite annoyed if I ever find myself spending hours in investigating a bug report that turns out to be due to a hack. -- Mark -- http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum.
