SourceForge has been redesigned. Learn more.
Close

#2279 subscribe on NoSelect folders

open
nobody
Folders (317)
5
2006-10-09
2006-09-27
No

Versoin: Squirrelmail 1.4.5

I checked the change summary and didn't see this fixed
in new versions.

The problem is that squirrel mail will do a "subscribe"
on a NoSelect folder on the imap server (like a
directory) when you first login.

In combination with the latest UW imapd serve (2006a),
this causes squirrel mail to bomb (at least in the left
frame, where it is trying to load folders).

Intead of giving a folder list it gives the error:

ERROR: Could not complete request.
Query: SUBSCRIBE "mail/WHATEVER"
Reason Given: Can't subscribe mail/WHATEVER: not a
mailbox

Looks like this is a no-no?

RFC 3501 says this about the subscribe command:

A server MAY validate the mailbox argument
to SUBSCRIBE to verify that it exists.
However, it MUST NOT unilaterally remove an
existing mailbox name from the subscription
list even if a mailbox by that name no longer
exists.

So, that's what imapd is doing; if the name is not a
mailbox (it has the \NoSelect attribute) it is not
added to the subscription list.

Hope that helps, thanks.

Discussion

  • Tomas Kuliavas

    Tomas Kuliavas - 2006-09-27

    Logged In: YES
    user_id=225877

    Are you sure that error is not "Can't subscribe
    mail/WHATEVER/: not a mailbox"?

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2006-09-28

    Logged In: YES
    user_id=225877

    Please answer the question.

    SquirrelMail 1.4.8 fixed subscribe command used when
    noselect folder is created.

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2006-09-28
    • status: open --> pending
     
  • Joshua Frigerio

    Joshua Frigerio - 2006-09-29
    • status: pending --> open
     
  • Joshua Frigerio

    Joshua Frigerio - 2006-09-29

    Logged In: YES
    user_id=1607523

    Oops, I answered by replying to the email, not realizing
    that my reply wouldn't post back here. I'm new to this
    particular bug tracking system. Anyway, here's what I replied:

    ==========================================
    >Are you sure that error is not "Can't subscribe
    >mail/WHATEVER/: not a mailbox"?

    Sorry, isn't that about what I posted? I'm missing the
    distinction you're making. You mean the slash at the end?
    No, no slash. That is, yes, I'm sure the error I posted was
    correct, I just cut-and-pasted it.

    But you can put this one on hold (or whatever) for a little
    while. Turns out I think this has something to do with a
    subscribe_me' (?) plugin that we got from somewhere, or one
    of our guys wrote internally. So it might not be a real bug
    at all.

    I'm checking into that and will reply with what I discover.

    Of course, the plugin is still using the underlying
    squirrelmail imap stuff, so in any case squirrelmail should
    never issue a "subscribe" command to a NoSelect
    folder/mailbox no matter what. (I am sure it's doing that,
    I have a verbose log of the imapd<->squirrelmail transaction.)

    Is that what's fixed in 1.4.8? Sorry if I missed that.

    Anyway, I'm still figuring this out, will get back it next
    week. Don't give it a worry till then.

    Thanks!

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2006-09-30

    Logged In: YES
    user_id=225877

    If your plugin issues invalid IMAP command, it must be fixed.

    Please make sure that you get that error with standard
    unmodified SquirrelMail 1.4.8 scripts and standard third
    party plugins versions that can be identified by developers.

    SquirrelMail can subscribe NoSelect folders. Posted RFC3501
    quote does not say anything about subscribing noselect
    folders, it only says that server should not remove
    subscribed mailbox, when mailbox does not exist.

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2006-09-30

    Logged In: YES
    user_id=225877

    Issue is not present in v.2004.350. It is present only in
    2006a.369 and 2006b-dev. I suspect that it is UW IMAP bug
    introduced by some rewrite in 2006 version.

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2006-10-05
    • assigned_to: nobody --> tokul
     
  • Tomas Kuliavas

    Tomas Kuliavas - 2006-10-09
    • assigned_to: tokul --> nobody
     
  • Joshua Frigerio

    Joshua Frigerio - 2006-10-10

    Logged In: YES
    user_id=1607523

    Well, the original problem I reported was from a plugin that
    we had written locally. It was another admin here and I
    didn't realize we had shot our own foot. It's a plugin that
    simply subscribes the users to every possible folder so that
    they don't have to do it manually.

    But our code wasn't checking each folder for which type it
    was, it was just going through them all and subscribing them
    all. I just adjusted the call so that errors were not
    handled by the imap routine and that was enough to fix the
    problem for us.

    I suppose the question still remains of whether or not the
    imap routines themselves should be smart enough not to
    subscribe to noselect folders, but it could be that's really
    the responsibilty of the caller of the imap command and not
    the SM imap lib itself. I'll leave that one for you all to
    decide.

    Sorry for the panic, thanks much.

     
  • Tomas Kuliavas

    Tomas Kuliavas - 2006-10-10

    Logged In: YES
    user_id=225877

    Main issue is not folder subscription or folder creation
    commands. These can be fixed.

    Main issues are caused by required changes in folder
    management page. SquirrelMail will have to build delete and
    rename boxes and subscription management code differently.
    Any change in src/folders.php requires testing that it does
    not break something on some IMAP server.

     

Log in to post a comment.