imap folders missing when mixing dovecot with gmail

Issue #73 new
Serafin Rusu created an issue

Hello,

I found a bug when I mixed Dovecot as primary account with Gmail as identity account: folders from Gmail are missing. (also from Synology MailPlus).

After a little research I found in session the following variables:

Bad setup for Gmail folders:

[imap_namespace] => Array
        (
            [personal] => Array
                (
                    [0] => Array
                        (
                            [0] => INBOX.
                            [1] => .
                        )

                )

            [other] => 
            [shared] => 
            [prefix_in] => INBOX.
            [prefix_out] => INBOX.
        )

    [imap_list_conf] => Array
        (
            [0] => INBOX.
            [1] => Array
                (
                )

        )

Good setup for Gmail folders:

    [imap_namespace] => Array
        (
            [personal] => Array
                (
                    [0] => Array
                        (
                            [0] => 
                            [1] => /
                        )

                )

            [other] => 
            [shared] => 
            [prefix_out] => 
        )

    [imap_delimiter] => /
    [imap_list_conf] => Array
        (
            [0] => 
            [1] => Array
                (
                )

        )

These variables are not changing after identity change, maybe they need to be preserved and restored.

So my dirty fix was to add into file ident_switch.php at line 737 ( in function on_switch() after $_SESSION['iid' . self::MY_POSTFIX] = $r['iid'];)

$_SESSION['imap_namespace']="";
$_SESSION['imap_namespace']=array();
$_SESSION['imap_list_conf']="";
$_SESSION['imap_list_conf']=array();

Comments (4)

  1. James Knowles

    I experienced the same behavior as @Serafin Rusu . Using the fix provided, folders now appear and behave as expected for the gmail account.

    Thank you!

  2. Log in to comment