#401 Nonexisting special folders may be subscribed

open
nobody
None
5
2006-08-15
2006-08-15
Anonymous
No

Some IMAP servers may consider special folders Sent,
Trash, Drafts as already subscribed even though they do
not yet exist. This causes error messages in function
sqimap_mailbox_create.
Patch is attached as file; line numbers for 1.4.7 or 1.4.8.
<strube <AT> physik3 (DOT) gwdg (DOT) de>

Discussion

  • Patch for functions/imap_mailbox.php

     
    Attachments
    tt
  • Logged In: YES
    user_id=285765

    Thanks. Does that actually introduce error messages?

    Which IMAP server is this?

    When fixing this, I would be more in favour of adding that
    test to sqimap_subscribe: if you want to subscribe a folder
    that already is subscribed, just return without further action.

     
  • Logged In: NO

    The error message is ... ALREADY SUBSCRIBED ...

    The IMAP server is an old Solaris SIMS-2.0 (also requiring
    some back-porting to non-Rev1 IMAP4 - yes, works; but this
    is not related to this problem).

    > I would be more in favour of adding that
    > test to sqimap_subscribe

    I agree:

    function sqimap_subscribe ($imap_stream, $mailbox) {
    - $read_ary = sqimap_run_command($imap_stream, "SUBSCRIBE
    \"$mailbox\"",
    + if (!sqimap_mailbox_is_subscribed($imap_stream, $mailbox))
    + $read_ary = sqimap_run_command($imap_stream,
    "SUBSCRIBE \"$mailbox\"",
    true, $response, $message);
    }