Subject: unsubscribe a removed mailbox?

From: "Matteo Gelosa" <[email-masked]>
Date: Mon, 11 Mar 2002 17:45:54 +0100

Should it be possibile to unsubscribe a removed mailbox? I didn't find
anything against this in the IMAP RFC, but while implementing my own driver
for the UofW server I noticed that the mail layer calls a mailbox validation
function of the underlaying driver before unsubscribing and,
in my implementation, this fails if the folder does not exist.

Where am I wrong?

Thanks, Matteo Gelosa

--
Matteo Gelosa                                             I.NET S.p.A.
Research & Development      Via Darwin, 85 - 20019 Settimo Milanese MI
mailto:[email-masked]                            Tel. +39.02.32863.1
http://www.inet.it                               Fax +39.02.32863.7701

-- 
------------------------------------------------------------------
 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: Mon, 11 Mar 2002 11:01:01 -0800 (PST)

> in my implementation, this fails if the folder does not exist.

This is only an issue if your driver has its own subscription mechanism
instead of using the c-client subscription manager.  The standard drivers
either use the subscription manager (most names), the .newsrc file (for NNTP
or #news. names), or they pass the task on to an IMAP server (for IMAP names).
In all of these cases, c-client knows which subscription facility owns the
name; if it isn't IMAP, NNTP, or a #news. name, then it goes to the
subscription manager.

If your driver creates its own subscription mechanism, then you should have
some named-based way of identifying that the driver owns that mailbox,
otherwise you may be subject to the default actions of the dummy driver as
well as subscription manager issues.

And yes, I think that it should be possible to unsubscribe a removed mailbox.
That's why UW imapd allows it.

---

From: "Matteo Gelosa" <[email-masked]>
Date: Mon, 11 Mar 2002 21:15:04 +0100

Thanks for your answer. Anyway there's still an open point. Please,
correct me if I'm wrong. The driver routine <driver>_valid is called
both to allow unsubscription and rename. For the rename function the
<driver>_valid must answer NIL on the new name (i.e. the new mailbox
must not exist). So if the function says YES to validate an unsubscription
(and the mailbox does not exist) it says YES also on the renaming (for the
new name) and the rename fails. The opposite will make the unsubscription
to fail. I think it should be legal to rename an existing mailbox to a
not existing one, even though still subscribed, but this could be my
wrong point. The version of the server I'm using is imap2001a.

Maybe I have not clear the meaning of the <driver>_valid function,
I understood it must say yes if the mailbox exists, no otherwise.

Thanks in advance,
Matteo

----- Original Message -----

From: "Mark Crispin" <[email-masked]>
To: "Matteo Gelosa" <[email-masked]>
Cc: <[email-masked]>
Sent: Monday, March 11, 2002 8:01 PM
Subject: re: unsubscribe a removed mailbox?

---

From: Mark Crispin <[email-masked]>
Date: Mon, 11 Mar 2002 12:58:20 -0800 (PST)

I guess that you have encountered a problem.  Nobody before has tried to use a
local driver which doesn't use the subscription manager and has rename.  The
only local driver which doesn't use the subscription manager is the news
driver (for a local filesystem news spool) which doesn't have rename.  And
news has its own subscription mechanism for legacy purposes.

Why aren't you using the subscription manager (in other words, not have
subscription/unsubscription/lsub methods)?  That would seem to make your task
much easier.

---

From: "Matteo Gelosa" <[email-masked]>
Date: Tue, 12 Mar 2002 09:59:48 +0100

Thanks again. Anyway my local driver uses a database implementation of
a messaging system, so I have implemented at the driver level the
subscribe/unsubscribe/lsub methods and obviously I have to support
renaming. Unfortunately, clients such as Outlook use subscription
in terms of visibile mailboxes so I had to implement it (also to be
standard compliant...).
The messaging system supports access by a proprietary application
protocol and the IMAP4 driver (such as POP3 and Webmail/HTTP) is
a gateway to this protocol and for this reason I cannot use the
standard available drivers. I solved the problem by hacking the
mail_unsubscribe by removing the mail_valid check: the unsubscription
fails anyway if the mailbox is not subscribed (well, this works
but I don't like it too much because it violates the driver boundaries).

Bye, Matteo