Bug: create gmail imap account results in incorrect folder list
Status: NEW
Priority: P2
Created: 2023-05-30 17:23:37+00:00
Resolved: 2024-10-09 09:30:34+00:00

Installed beta 114.05b
Create imap gmail account with no problem - excellent.

**Folder Pane shows:**
Inbox
Drafts
Sent Mail
Archived
Spam
Bin
***INBOX***
-- Mozilla Firefox
-- Samsung All 4
Online Orders
Starred
Testing

This is incorrect and not desired.

**Expected:**
Inbox
-- Mozilla Firefox
-- Samsung All 4
Drafts
Sent Mail
Archived
Spam
Bin
Online Orders
Starred
Testing

**Checked the profile in 'ImapMail' > imap.gmail.com**
I see:
[Gmail].sbd
[Gmail].msf
Archives.msf
Drafts.msf
INBOX
INBOX.msf
msgFilterRules.dat
Sent.msf

Note: There are no such gmail folders called 'Sent' and 'Archives' and I suspect this 'Drafts.msf' file is also wrong.  It seems Thunderbird has created some files which would normally appear in a pop account.

**Expected**
No [Gmail].sbd folder and no [Gmail].msf file.  
No false folders that normally appear when creating a pop mail account
All the items now found in [Gmail]sbd - see below to be listed under imap.gmail.com

**In 'ImapMail' > imap.gmail.com > [Gmail].sbd**
I see:
INBOX.sbd
Archived
Archived.msf
Bin
Bin.msf
Drafts
Drafts.msf
INBOX.msf
Online Orders.
Online Orders.msf
Sent Mail
Sent Mail.msf
Spam.msf
Starred
Starred.msf
Testing.msf

**Expected**
All the above in imap.gmail.com NOT in [Gmail]sbd

**In 'ImapMail' > imap.gmail.com > [Gmail].sbd > INBOX.sbd**
I see:
Mozilla Firefox
Mozilla Firefox.msf
Samsumg All 4
Samsumg All 4.msf

This was expected - but INBOX.sbd should be in imap.gmail.com and NOT in [Gmail].sbd

I want to remove the [Gmail],sbd - Tried:
- In Account Settings > Server Settings
- click on 'Advanced' button
- IMAP server directory is blank
- IMAP server directory type : [Gmail]
- click on 'OK'

Exit Thunderbird and restart Thunderbird.

**Folder Pane Results:**
- Every folder is duplicated except 'Inbox' - Not expected.
- The folders in the italic ***INBOX*** remain in that folder, however, they also appear as normal folders - not subfolders and not subfolders to the 'Inbox' which is where they are supposed to be. Neither expected.
 
** In profile folders... 'ImapMail' > imap.gmail.com**

I now see most of the correct files and folders I would expect to see.
The [Gmail].sbd  has gone.
I see :
INBOX.sbd
Archived
Archived.msf
Archives.msf - this is still wrong at this point - I will need to delete this file
Bin
Bin.msf
Drafts.msf  - I will need to delete this file
Drafts-1 - I will need to rename to remove the number
Drafts-1.msf  - I will need to rename to remove number
INBOX
INBOX.msf
msgFilterRules.dat
Online Orders.
Online Orders.msf
Sent Mail
Sent Mail.msf
Sent.msf  - this is still wrong at this point - I need to delete this file
Spam.msf
Starred
Starred.msf
Testing.msf

- Exit Thunderbird and delete  wrong files and rename files as noted above.

- Start Thunderbird

**Result**
All folders display correctly.
The Inbox now displays correct subfolders.
The italic INBOX has gone.

**Expected**

When I edited - IMAP server directory type : [Gmail]
And restarted Thunderbird
All folders to be correct not duplicated.
I should not need to exit Thunderbird, edit  files in profile and restart again.

Can someone please check to see if they can replicate?
I've removed account, added again and managed to get identical results each time.
It needs a double restart to remove duplicate folders and get correct arrangement.