Closed Bug 1195424 Opened 9 years ago Closed 6 years ago

Support for OVH-hosted email addresses using IMAP is poor

Categories

(MailNews Core :: Backend, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1427725

People

(Reporter: davidbourguignon.net, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Build ID: 20150807085045

Steps to reproduce:

I added an email account using an email address hosted on OVH.com servers...


Actual results:

The OVH server parameters were correctly defined by TB automatic procedure. However, OVH has a very special (and somewhat inconsistent) server-side directory structure for special directories (namely INBOX, INBOX.INBOX.Drafts, INBOX.INBOX.Junk, INBOX.INBOX.Sent, INBOX.INBOX.Trash) and this is not correctly mapped into TB data model.

As a result, after lots of fighting (specifying prefixes such as "INBOX." and setting up TB own special directories one by one), the best one can expect is to have on one side the original special directories (the ones used by Roundcube, the OVH webmail solution by default) and on the other side new special directories created and used by TB for its own purposes. It works but it is definitely not satisfactory because the two clients (webmail and TB) are now incompatible.


Expected results:

TB should be much more tolerant to inconsistent directory tree structures such as the one provided by OVH? Thanks in advance for your help!
don't know if this is backend or imap. opting for the former
Component: Untriaged → Backend
Product: Thunderbird → MailNews Core
Dear Wayne, thanks a lot for your feedback, and my apologies for missing it! I get back to you one year later, with some news...

After fighting a lot, I managed to set up a correct mapping of Thunderbird special directories onto OVH servers special directories, except for Trash, which is apparently managed differently from the others by Thunderbird. Why? I have no idea.

My recent experience with other IMAP clients such as Android Mail, pointed out another option: Android Mail does not bother creating a link with OVH server special directories or duplicating them on the server when it cannot, as Thunderbird does, it simply creates its own special directories locally.

Such a solution is convenient: no messing up and the user can then drag-and-drop content from the local directories to the distant ones if necessary. Not perfect I agree, but way better than creating duplicates on the mail server IMHO.

What do you think? Anyone else experiencing problems with OVH mail? Thanks in advance!
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64
Version: 38 → 45
(In reply to David Bourguignon from comment #2)
> ...
> What do you think? Anyone else experiencing problems with OVH mail? 

Doesn't seem to be any ovh reported issues other than bug 884998.
Considering they have some documentation - http://help.ovh.com/EmailConfiguration - seems to me that ovh support should be your best source of info.
Unfortunately Wayne, OVH support told me they are fine, because this is an email client issue... I am trapped in an endless loop! :-)

The problem is: Thunderbird seems to be the only IMAP email client I know to have issues dealing with OVH very special configuration.

I tried CozyCloud Mail (a personal cloud solution), Android Mail (a mobile device solution) and Gmail, and they are all fine. I have not tried Microsoft Outlook and Apple Mail.

If there is no way to improve this, I will simply have to stop using Thunderbird and switch to Gmail, I am afraid.
Post-scriptum:

Just got an idea: if anyone is interested, I can create a test email account by OVH, and send you the password by private messaging.

Thanks in advance for your help!
(In reply to David Bourguignon from comment #0)
> However, OVH has a very special (and somewhat inconsistent) server-side
> directory structure for special directories
> (namely INBOX, INBOX.INBOX.Drafts, INBOX.INBOX.Junk, INBOX.INBOX.Sent, INBOX.INBOX.Trash)
> and this is not correctly mapped into TB data model.

What is Namespace used by your IMAP server? (see Server Settings/Advanced)
Defined so at server side?
What Mbox are shown in Subscribe?
INBOX.INBOX.xxx was created by you & your Thunderbird, wasn't it? 

Following, isn't it?
(a) Namespace = IMBOX. and all Mbox is defined under Inbox.
(b) Because trash folder is Inbox/Trash at server,
    you set mail.server.server#.trash_folder_name=INBOX/Trash at Server setting.
(c) Due to (a) and (b), Thunderbird requests INBOX/INBOX/Trash.
    because actual trash folder in Thunderbird is Namespace + mail.server.server#.trash_folder_name.

(b) is wrong. It should be mail.server.server#.trash_folder_name=Trash in this case.
If you manually specified mail.server.server#.trash_folder_name by yourself, it's your fault.
If you set it via trash folder selection UI of Thunderebird, it's already known bug of Thunderbird.. 
  Spec is mail.server.server#.trash_folder_name=Trash if Namespace is used.
  However, trash folder selection UI sets mail.server.server#.trash_folder_name=Inbox/Trash,
  even though Namespace=Inbox is used.
  
If Namespace=INBOX. and if INBOX.INBOX.Trash is required Mbox name at server for trash folder, it's simple.
  mail.server.server#.trash_folder_name=INBOX/Trash.
  
For other special folders such as Sent, Drafts :
  It's pretty simple.
  Merely choose any required folder at Copies&Folders setting and Junk setting.
Even though this, why can your case be bug of Thunderbird?

Do you set INBOX.Sent etc. instead of INBOX/Sent etc. in folder path setting of prefs.js or Confif editor?

Do you set "Server directry" at Server Settings/Advanced?
Even though you set Server directry=Inbox when Namespace=INBOX.,
you set Inbox/Sent etc. in folder path setting of prefs.js or Config editor?

Is Drafts/Junk/Sent/Trash is actual string in Mbox name like INBOX, INBOX.INBOX.Drafts, INBOX.INBOX.Junk, INBOX.INBOX.Sent, INBOX.INBOX.Trash)
Actual string in Mbox name at server is localized name?
Did you create "INBOX.Sent" folder via Thunderbird UI, instead of next?
  At Inbox, create subfolder named "Sent" under Inbox.
Dear Wada, thanks a lot for your feedback! I have not been able to answer to all of your questions, but here are a few extra info regarding the case:

- OVH recommends using INBOX as namespace for its email server.

- Special directories are in fact hard-coded in OVH email server configuration. You cannot edit them or delete them. Their inconsistent path (such as INBOX.INBOX.Drafts) was defined by OVH, not by my use of Thunderbird or any other tool.

- Given this inconsistent path (one level is missing in the directory tree between INBOX and INBOX.INBOX.Drafts for example), Thunderbird does not find them and creates new special directories, that are then synchronized on the OVH email server, creating a lot of confusion.

- Of course, I could decide to get rid of OVH default settings, and not use their special directories with an inconsistent path but 1) they will still be around and 2) the Roundcube webmail used by OVH will use these default special directories, and I would end up with two separated special directory trees with emails in them.

- I have noticed three behaviors in others tools facing this awkward situation:
  - Apple Mail also gets lost (there is an entire thread on this topic in Mac Generation, a French-speaking Mac users forum, see http://forums.macg.co/threads/mail-ovh-en-imap.1259237/).
  - Android Mail creates new special directories for its use, but without copying them on the server. To synchronize their content, it is then possible to drag and drop emails by hand, for example from Android Mail Sent local directory to the other Sent directory, which is then synchronized on the OVH server.
  - In Cozy Cloud webmail, it somehow manages to handle this gracefully, but I do not know how...

Thanks in advance for your help!
(In reply to David Bourguignon from comment #8)
> - Special directories are in fact hard-coded in OVH email server
> configuration. You cannot edit them or delete them. Their inconsistent path
> (such as INBOX.INBOX.Drafts) was defined by OVH, not by my use of
> Thunderbird or any other tool.
> 
> - Given this inconsistent path (one level is missing in the directory tree
> between INBOX and INBOX.INBOX.Drafts for example), Thunderbird does not find
> them and creates new special directories, that are then synchronized on the
> OVH email server, creating a lot of confusion.

It's not "inconsistent". Server can freely define his Mbox, even if it's not so good definition.
It's not problem for Thunderbird usually.
Gmail can define Gmail Labels like next.
  Inbox/ABC/DEF (no need of existence of Inbox/ABC, ABC can be ”Inbox”)
  In this case, if accessed via Gmail IMAP, these are shown like next by Thunderbird.
    Inbox
      ABC  <= Tb shows this dummy Mbox for showing/accessing DEF.
        DEF

What is your Server Settings/Advanced, "Show only subscribed folder"?
If "Show only subscribed folder" is used, have you checked "Subscribe"?
Is INBOX/INBOX/Drafts subscribed?
If not, subscribe it, or don't use "Show only subscribed folder".

Once INBOX -> INBOX -> XXX is shown at folder pane, as I already wrote, you can select it at Copies&Folders setting and Junk setting, and once INBOX -> INBOX -> Trash is shown at folder pane, you can set mail.server.server#.trash_folder_name=INBOX/Trash.

Note:
All Mail, Trash, Drafts etc. of Gmail Web mail is shown as [Gmail]/All Mail, [Gmail]/Trash, [Gmail]/Drafts etc. via Gmail IMAP.
And, Mbox corresponds to [Gmail] doesn't exist on Gmail Web mail nor Gmail IMAP server.
But you can create general Gmail Label named "[Gmail]", and mail can be copied/moved to the actual "[Gmail]" folder using Thunderbird.

By the way, OVH email server doesn't permit creation of subfolder under Inbox? (INBOX.Trash, INBOX.Drafts etc.Trash, Drafts used by Web mail of OVH is actually INBOX.INBOX.Trash, INBOX.INBOX.Drafts, which is passed via IMAP of OVH?
I received forwarded your mail from Wayne, and I checked OVH IMAP.

(1) With newly created Thunderbird profile, define the OVH IMAP account only.
    Disable any excess setting like "new mail check", "automatic synchronization" etc.
    Disable any excess setting like "Junk setting".
    Finally, uncheck "[ ] Show only subscribed folders" for seeing all defined Mbox.
(2) At folder pane of Thunderbird, click Inbox
    => First access to the IMAP server
    => root level Inbox was shown in Italic at folder pane of Thunderbird
       This indicates "Inbox is not returned to LIST".
    => At Server Settings/Advanced,
       Personal Namaspace : "INBOX."
(3) "Subscribe" at context menu of the OVH IMAP account.
    => Inbox  (shown in Italic by Thunderbird => Inbox is not returned to LIST/LSUB)
         Inbox  (shown in Italic by Thunderbird => Inbox.Inbox is not returned to LIST/LSUB)
           Drafts (Subscribed)
           Junk   (Subscribed)
           Sent   (Subscribed)
           Trash  (Subscribed)
(4) Expand Mbox at folder pane of Thunderbird
    => Inbox  (shown in Italic or Not-Italic by Thunderbird. I don't remember)
         Inbox  (shown in Italic by Thunderbird)
           Drafts
           Junk
           Sent
           Trash
(5) After some operations such as "expand/collapes root level Inbox, account",
    root level Inbox at folder pane was shown as "Inbox" (not Italic).
    Because "Inbox" is always defined by protocol named IMAP,
    Thunderbird seems to show it in "not Italic" at folder pane,
    even if root level Inbox is not returned to LIST nor LSUB.
    (Mbox shown in Italic == identical to \Noselect Mbox. It's applied to Dummy Mbox)

In Thunderbird, as far as "Show only subscribed folders" is not used, as I stated in above, and as I already wrote, these folders can be selected at Copies&Folders and Junk Settings and can be used by mail.server.server#.trash_folder_name=INBOX/xxx. 
i.e. As far as "Show only subscribed folders" is not used, there is no problem in Thunderbird, even if the OVH IMAP server behaves not so well for us.

Please don't confuse following:
(a) Problem in Thunderbird when "Show only subscribed folders" is used and when Inbox is not returned to LSUB(and/or LIST) from IMAP server.
(b) Problem in other IMAP clients due to special behavior of the OVH IMAP server.
Because here is B.M.O, please never add comments or complaints on (b) at here.

If problem (a), please see "User Story" of Bug 402793 and get IMAP log with minimum configuration like (1) in above my test, and please check IMAP log content using Text Editor.
Note:
Please never paste long log data to comment of bug.
Please attach required part of log file(merely a text file) to bug, if log analysis by developer is needed.
(In addition to Comment #10)

I couldn't observe difference between following in Thunderbird with the OVH IMAP server.
(i)  "Show only subscribed folders" is not used
(ii) "Show only subscribed folders" is used
i.e. There is no problem in Thunderbird, even if behavior of the OVH IMAP server is special.

What is actual problem of Thunderbird in this bug of Bugzilla.Mozilla.Org?
FYI.

Thunderbird has "IMAP server directory" feature for "Namespace=Inbox && All is under Inbox" case.
(Server settings/Advanced)
If "IMAP server directory=INBOX/INBOX" is set, Thunderbird shows Mbox like next at folder pane.
  AccountName
    Inbox
    Drafts
    Junk
    Sent
    Trash
If folder=XXX is created as "folder under the account" at folder pane of Thunderbird,
this is interpreted as "Inbox/Inbox/XXX"(IMAP server directory + XXX).
Because of Delimiter=".", this is translated to "Inbox.Inbox.XXX".
Because this mbox name starts with Personal Namespace string, this is used as-is.
So, "create Inbox.Inbox.XXX" is requested to server from Thunderbird.
Mbox is shown like next.
  AccountName
    Inbox
    Drafts
    Junk
    Sent
    Trash
    XXX
Note:I created ThisIsTestFolder(==INBOX.INBOX.ThisIsTestFolder) in test account and copied a mail to it.

If "folder pane display" is annoyance for you, "IMAP server directory=INBOX/INBOX" can reduce your annoyance.

Because "IMAP server directory" is implemented for "Personal Namespace=INBOX." and "all folder is under the Namespace" case,
"IMAP server directory=Personal Namespace"(IMAP server directory=Inbox) is usual setting.
I believe "IMAP server directory=INBOX/INBOX" works well in ordinal/normal situation.
However, I don't know what happens in special situation or in error handling.
> Bug Summary : Support for OVH-hosted email addresses using IMAP is poor

"poor" in what?
What is "poor" of Thunderbird in your case?
Because Thunderbird is pretty tolerant with OVH IMAP server, rather excellent, isn't it? :-)

IIRC, outstanding major problems of Thunderbird is following only in your case.
Two big issues in "trash folder selection UI".
(a) Bug 480393 : if localized Thunderbird build, localized trash name is set in mail.server.server#.trash_folder_name
(b) Bug 491424 : if Namespace is used by IMAP server, Namespace string is not removed in mail.server.server#.trash_folder_name
But these are never OVH IMAP only problem. These bugs occur with any IMAP server if condition is met.

Note:
IIUC, if IMAP server directory=INBOX/INBOX is used, Bug 491424 won't occur in your case.
- For folder selection UI, folder name==Trash, so mail.server.server#.trash_folder_name=Trash is set.
Sorry, Thunderbird was not so excellent in your case.

(1) If "IMAP server directory=INBOX/INBOX" is used,
(2) and if default of "XXX of this account" is effective in Server settings, Copies&Folders, Junk settings,
(3) and if Thunderbird requests creation of XXX according to default setting
    before XXX at folder pane(actual mbox==INBOX.INBOX.XXX) is detected as special folder in Thunderbird,
(4) XXX is created under top level Inbox, according to Personal Namespace="INBOX.".
This may be due to "Namespace != IMAP server directory".
This may occur by default setting+Namespace before "IMAP server directory=INBOX/INBOX" is used.

OVH IMAP server doesn't reject "create INBOX.XXX", so INBOX.XXX can be created.
Because the XXX folder(==INBOX.XXX) is normally created, "attribute of special folder" is set by Thunderbird in Thunderbird.
Problem in this case is:
Once "attribute of special folder" is set by Thunderbird,
- There is no way to delete the special folder in Thunderbird.
  Thunderbird doesn't permit to delete unless "attribute of special folder" is removed.
- It's pretty hard to remove the "attribute of special folder" from folder in Thunderbird.

To remove the "attribute of special folder" from Inbox.XXX, "set it, then remove it" is needed.
(a) Inbox.Trash
    At Server Settings, with "Move to trash", select Inbox.Trash, and end.
    At Server Settings, change to "Just mark it as deleted", and end.
    => Trash icon is removed from Inbox.Trash => Inbox.Trash can be deleted using Thunderbird.
(b) Other than Inbox.Trash
    At Copies&Folders or Junk Settings, via "Other:", select Inbox.XXX, and end.
    At Copies&Folders or Junk Settings, via "Other:", select XXX(==INBOX.INBOX.XXX) or other, and end.
    => special folder icon is removed from Inbox.XXX => Inbox.XXX can be deleted using Thunderbird.

If "Show only subscribed folders" is not used, following is simplest/easiest way.
 At server side(for example, via Web Mail), delete the Inbox.XXX.
 => because "Show only subscribed folders" is not used,
    non-existent mbox at IMAP server is removed in Thunderbird too.
Because number of predefined mbox is pretty small in OVH IMAP,
I recommend you to uncheck "Show only subscribed folders" to reduce unwanted phenomena.
If all mbox is always shown, there is no need to care "subscribed/not-subscribed state".

I don't think "above is poor in Thunderbird".

Namespace="INBOX." means "all mbox should be created under top level Inbox".
Default of special folder is "top level Trash, Drafts etc. of this account" in Thunderbird(and many mailers).
When the "special folder defined in setting" is not found, Thunderbird tries to create it.
This is never "bad behavior", because majority of users requests "automatic creation of special folder".
Upon creation of the special folder, Thunderbird adds "INBOX." according to Namespace="INBOX." request from server.

What of these is "poor"?
Your case is merely "default in Thunderbird is different from server's default", isn't it?
- In your case, server's default==INBOX.INBOX.xxx instead of "top level xxx" nor INBOX.xxx.
It's same as "Tb's default=Drafts but server uses Draft as draft folder", isn't it?
This is Yahoo! IMAP server case.
It's applicable to Gmail IMAP too because Gmail IMAP uses [Gmail]/Drafts instead of top level Drafts.
I did Google search for "ssl0.ovh.net imap namespace", and I found following post in a forum.
https://forum.ovh.com/showthread.php/68532-Configuration-IMAP-Thunderbird
A post in this topic : mynab 05/03/2011, 09h10
I can't read/understand French, but I can understand following part.
> Inbox
>   Sent
>   Trash
> Drafts
> Sent
> Junk
> Trash
> 
> IMAP server directory = INBOX
> Personal namespace = "INBOX."
> Allow server to override these namespaces = coché

There is no difference from my comments, except "IMAP server directory = INBOX".

(1) mbox structure
According to this post, mbox of OVH IMAP on 05/03/2011 was :
> Inbox
>   Inbox.Drafts
>   Inbox.Sent
>   Inbox.Junk
>   Inbox.Trash
> (this is ordinal structure when Namespace="INBOX.")
However, mbox of OVH IMAP today is :
> Inbox
>   (no Inbox.Inbox)
>      Inbox.Inbox.Drafts
>      Inbox.Inbox.Sent
>      Inbox.Inbox.Junk
>      Inbox.Inbox.Trash

(2) Sent, Trash under top level Inbox
> Inbox
>   Sent
>   Trash
This is perhaps same as what I saw while testing "IMAP server directory = INBOX/INBOX".
I switched between "no IMAP server directory" <=> "IMAP server directory = INBOX/INBOX" a few times.
Special folder under top level Inbox was perhaps created by Thunderbird according to default setting+Namespace.

(In reply to David Bourguignon from comment #4)
> Unfortunately Wayne, OVH support told me they are fine, because this is an
> email client issue... I am trapped in an endless loop! :-)

I can not believe that current mbox structure by OVH is intentional nor design of OVH system.
I believe that intention is still one on 05/03/2011, if President and engineer of OVH is not Alien.

What did you talk about with OVH support?
Did you tell accurate current mbox structure of OVH IMAP to OVH support?
Following is a web page found by Google search for ssl0.ovh.net imap "INBOX.INBOX".
https://github.com/nylas/N1/issues/790
Following is seen(posted at April, 2016, because first post was Dec,2015)
> Here are the technical name of the folders and their label :
> INBOX.INBOX.Drafts: Brouillons
> INBOX.INBOX.Sent: Envoyés
> INBOX.INBOX.Junk: Pourriels
> INBOX.INBOX.Trash: Corbeille
> 
> Apple Mail creates his own Sent Mail and Trash folders, that would be a simpler solution.

Aha!
I now can understand reason of "OVH support told me they are fine, because this is an email client issue...".

> (1) OVH IMAP uses Personal Namespace="INBOX.".
> (2) OVH IMAP permits "create INBOX.XXX", and OVH IMAP normally creates "INBOX.XXX" by the request.
> (3) There is no predeined mbox named INBOX.??? in OVH IMAP server.
> (4) Therefore, any IMAP client can create/use his own special folder under top level INBOX,
>     according to his own default special folder name + rule of Personal Namespace="INBOX.".
>     And, each IMAP client does do it, if "automatic special folder creation" is supported.
>     For example,
>     Thunderbird creates/uses INBOX.Sent based on default special folder nsme + Namespace requested by server.
>     A mailer may create/use INBOX.Sent Mail, and other mailer may create/use INBOX.Sent Items.
>     There is no problem, unless user wants to share the special folder with other IMAP clients/Web Mail.
> (5) From perspective of IMAP client :  
>     OVH IMAP server merely has predefined(and maybe excess) dummy INBOX.INBOX.
>     OVH IMAP server merely has predefined(and maybe excess) INBOX.INBOX.Sent etc.

If the predefined INBOX.INBOX.Sent corresponds to Sent of OVH Web Mail,
it's similar to "[Gmail]/Sent in Gmail IMAP" from perspective of IMAP client.
Replace dummy second level INBOX by [OVH].
> top level INBOX is Inbox defined by protocol named IMAP.
> the top level INBOX is pointed by Personal Namespace="INBOX." according to design/implementation by OVH
> there is no predefined INBOX.??? by OVH IMAP
> dummy INBOX.[OVH] is for special folders used by OVH Web Mail
> predefined INBOX.[OVH].Drafts, INBOX.[OVH].Junk, INBOX.[OVH].Sent, INBOX.[OVH].Trash

If so, there is no flaw in OVH IMAP definition.
If user want to use "Drafts of OVH Web Mail" as "draft folder in an IMAP client" using OVH IMAP,
user has to set "draft folder in the IMAP client" = INBOX.INBOX.Drafts at the IMAP client's setting.
This is absolutely same as "[Gmail]/Drafts of Gmail IMAP which corresponds to Drafts of Gmail Web" case.

But dummmy second level name==INBOX is sufficiently confusing for ordinal peoples including me.
I guess President and engineers of OVH are Alian :-)
I observed "mbox doesn't exist response from server" on folder of folder pane of Thunderbird,
even though I tested with "Show only subscribed folders" unchecked.

(0) Test was executed with "Show only subscribed folder" unchecked in order to see all mbox always.
(1) While testing switch between "no IMAP server directory" <=> "IMAP server directory=INBOX/INBOX,
INBOX.XXX(where XXX=Drafts, Junk, Sent, Trash) was shown at folder pane with special folder icon.
Path of INBOX.XXX is result of "special folder name=XXX in setting" + Personal Namespace="INBOX.".
When the folder is clicked, "mbox doesn't exist on server" was sometimes returned from server.
i.e. There is no INBOX.on IMAP server, but folder is shown at folder pane of Thunderbird.
This is known phenomenon when Show only subscribed folder is used,
and when INBOX.XXX is deleted at server without removing "Subscribed state of INBOX.XXX".
(2) After removing special folder state/icon of INBOX.XXX,
    and after switching the special folder to INBOX.INBOX.XXX,
    when the folder is clicked, "mbox doesn't exist on server" was returned from server.
(3) This was same even after restart of Tb.
    Because I don't use "Show only subscribed folder",
    Thunderbird removes mbox from folder pane if the mbox is not returned to LIST command.
    So, this is perhaps phenomenon when INBOX.XXX is returned to LIST (SUBSCRIBED) for non-existent mbox.
(4) Because I already removed special icon from INBOX.XXX at step (2),
    "Delete XXX under top level Inbox" can be requested at this Thunderbird.
    When "Delete XXX under top level Inbox" was requested, INBOX.XXX disappeared permanently.
    IIRC, current Thunderbird issues "unsubscribe INBOX.XXX" even when INBOX.XXX is not returned to LIST.
(5) (1) was observed on any XXX while testing switch between "no IMAP server directory" <=> "IMAP server directory=INBOX/INBOX
     with setting change between "special folder=XXX of this account" <=> "special folder=INBOX.INBOX.XXX".

I don't know whether "INBOX.XXX is returned to LIST (SUBSCRIBED) for non-existent mbox" happened or not.
I don't know reason why it happens if it actually happened.

David Bourguignon(bug opener):
Did you see above phenomenon?

FYI.

In addition to above excess INBOX.XXX issue when user want to use INBOX.INBOX.XXX as special folder with OVH IMAP,
as I already stated in previous comment, there is following problem in Thunderbird when excess special folder was created.
- When INBOX.Trash was already created and trash icon was set by Thunderbird,
  transferring to INBOX.INBOX.Trash itself is easy,
  but "delete excess INBOX.Trash using this Thunderbird" is tough work
  once state of "INBOX.Trash==trash folder of Move to trash model in Tb's setting" is lost.
- When INBOX.XXX where XXX!=Trash was already created and special folder icon was set by Thunderbird,
  transferring to INBOX.INBOX.XXX itself is pretty easy,
  but "delete excess INBOX.XXX using this Thunderbird" is annoying job
  once state of "INBOX.XXX==a special folder in Tb's setting" is lost.
Note:
"using this Thunderbird" means that delete is always possible by other Thunderbird instance who doesn't hold "special folder state of INBOX.XXX".
I could find cause of "NO Mailbox doesn't exist: xxx".

I can not observe problem in Thunderbird and OVH IMAP, except:
(a) Thunderbird has Bug 480393 bug Bug 491424 in trash folder selection UI.
(b) OVH IMAP returns INBOX.Junk to LIST, but "NO doesn't exist:Junk" to select INBOX.Junk, if Thunderbird requests "subscribe INBOX.Junk" based on the LIST response(note: it may be "blindly", "without checking LIST response", by Thunderbird).
(c) When INBOX.Junk was created at folder pane of Thunderbird due to (b), it's not so easy for user to delete the non-existent INBOX.Junk in folder pane using this Thunderbird.

As easily known by IMAP log, OVH IMAP is an ordinal Dovecot IMAP server with Personal Namespace="INBOX.".
OVH IMAP merely doesn't have predefined mbox under the Personal Namespace(top level Inbox) except \Noselect INBOX.INBOX, and merely has predefined subfolders under the \Noselect INBOX.INBOX additionally.

"\Noselect INBOX.INBOX and subfolders under the INBOX.INBOX by OVH IMAP" simply produces user's confusion, don't it?

To Bug opener and Wayne:
What is actual problem of this *BUG* at Bugzilla.Mozilla.Org?


[Overview of test result, imap log]

(0) Environment
(0-1) setups
> "Show only subscribed folders" is not used => LIST is used instead of LSUB or LIST (subscribed)
> Personal Namespace = "INBOX." which is requested by OVM IMAP.
> Following is checked.
>   [ X ] "Allow server to override these namespaces
> IMAP server directory = Null (IMAP server directory is not used)
(0-1) mbox structure
> INBOX
>   INBOX.INBOX (\Noselect, so shown in Italic by Thunderbird
>     INBOX.INBOX.Drafts
>     INBOX.INBOX.Junk
>     INBOX.INBOX.Sent
>     INBOX.INBOX.Trash
>     INBOX.INBOX.NonPreDefined ( to hold non-predefined special folders during test )
>       INBOX.INBOX.NonPreDefined.Archives
>       INBOX.INBOX.NonPreDefined.Templates
>       INBOX.INBOX.NonPreDefined.DummyJunkToRemoveJunkIcon (for ease of Junk icon removal )

(1) When "Move new junk messages to" is already enabled at Junk Setting, change junk folder choice.
>     Other: INBOX.INBOX.NonPreDefined.DummyJunkToRemoveJunkIcon of this OVH IMAP
> =>  "junk" folder on: Junk of this IMAP account(OVH IMAP
>     This means "INBOX.Junk" because Personal Namespace="INBOX." is used by the OVH IMAP.
> (1-1) Thunderbird requests subscribe Inbox/Junk,
>       and it's rejected because Inbox/Junk doesn't exist.
>       23 NO Mailbox doesn't exist: INBOX.Junk
> (1-2) Inbox/Junk is shown at folder pane with Junk icon, although subscrive failed.

(2) Click Inbox/Junk at folder pane
> (2-1) Because folder open request, Thunderbird issues select "INBOX.Junk",
>       but it fails because Inbox/Junk is shown at folder pane with Junk icon although subscrove failed.
>       24 NO Mailbox doesn't exist: Junk
>
> Why Junk instead of requested INBOX.Junk in error message?
> Due to Namespace="INBOX." used by OVH IMAP himself?

(3) Terminate Thunderbird

(4) Restart Thunderbird
(4-1) OVH IMAP returns INBOX.Junk to LIST.
>   6 list "" "INBOX.Junk" 	
>   * LIST (\HasNoChildren) "." "INBOX.Junk" 	
>   6 OK List completed. 	
> This may be affected by "subscribe Inbox.Junk" requested by Thunderbird.
> This may be due to LIST (subscribed) support.
(4-2) OVH IMAP returns NO to "select INBOX.Junk" because INBOX.Junk doesn't exist in OVH IMAP.
>   3 select "INBOX.Junk"
>   3 NO Mailbox doesn't exist: Junk 
> But why "Junk" instead of "INBOX.Junk"? Due to Personal Namespace="INBOX."?

(5) Terminate Thunderbird
Dear Wada, thanks a lot for this in-depth investigation regarding the behavior of Thunderbird when using OVH IMAP servers. I apologize sincerely for not providing you with a more precise description of what happened. My apologies also for replying to your comments so late.

I hope that you have a better idea now on the general issue. I will try to give you some answers to the questions you were asking:

  - OVH Support Staff was mildly supportive: I described them the bizarre directory structure but they did not seem to acknowledge how complicated it is to currently setup Thunderbird for even an incorrect use of OVH IMAP servers.

  - OVH IMAP servers allow creation of subfolders under INBOX: you can do this by using Settings > Folders > + (I switched OVH Roundcube webmail UI to English on https://mail.ovh.net/roundcube/ so that you can try it yourself more easily).

  - The general issue I have been observing is:
    1) Thunderbird wizard for automatically setting up account preferences does not work with OVH IMAP servers. Therefore, a non-technical user will be lost right away.
    2) When taking the manual setup road, and reading documentation, one can manage to map all special directories to their OVH IMAP equivalent -- except for Trash! This is not a little problem, as you noticed yourself. 

I agree with you: "INBOX.INBOX and subfolders under the INBOX.INBOX by OVH IMAP simply produces user's confusion, doesn't it?"

Do you think it could be possible to address the Trash folder issue and to modify Thunderbird wizard for OVH IMAP servers, so that the right parameters are correctly and completely setup for non-technical users?

Thanks again for your precious help!
(In reply to David Bourguignon from comment #19)
>     2) When taking the manual setup road, and reading documentation, one can
> manage to map all special directories to their OVH IMAP equivalent -- except
> for Trash! This is not a little problem, as you noticed yourself. 

Have you read bugs I already pointed in some comments?
Problem produced by "trash folder setting via Tb's folder selection UI" is simply a bug of Tb.
  affected user : who uses localized Thunderbird build
                  who uses IMAP server which utilizes Namespace
Please don't repeatedly state about problem of already known and known-for-lo---ng-time bug(s) in other bug of B.M.O.

OVH IMAP is an ordinal Dovecot server with Namespace="INBOX.".
There are many imap servers who use Namespace.
And, some servers/Web Mail use mbox name for special folder which is different from Drafts, Sent, Junk, Trash.
What is difference between your case and Yahoo! IMAP?
Because Yahoo! uses "Draft" instead of "Drafts" for draft folder, users usually need to change draft folder setting of mailer if user wants to use the Draft of Yahoo! Web Mail as draft folder in mailer too.

If many OVH IMAP users confuse due to INBOX.INBOX.xxx by OVH, it's job of OVH, isn't it?
 Guide document:
  If you want to use INBOX.INBOX.Sent(which is used as draft folder by OVH Web Mail)
  as sent folder in your mailer too,
  set it in your mailer's sent folder setting.
This is applicable to many mailers used by OVH IMAP users, because INBOX.INBOX.Sent!=INBOX.Sent which Thunderbird expects when Namespace=="INBOX.", and because INBOX.INBOX.Sent!=INBOX.Sent Items or INBOX.Sent Mail which some other mailers expect when Namespace=="INBOX.".

By the way, phenomenon of "NO Mailbox doesn't exist: Junk for INBOX.Junk with junk icon at folder pane" is perhaps due to "INBOX.Junk is not predefined when Namespace=INBOX.". 
(1) When "use Junk of this account" and when predefined INBOX.Junk doesn't exist, Thunderbird blindly issues "subscribe INBOX.Junk", and Thunderbird generates INBOX.Junk at folder pane of Thunderbird.
(2) However, because "create INBOX.Junk" is not requested to server yet, imap server returns "mbox doesn't exist on server" to the "subscribe INBOX.Junk".
(3) After "subscribe INBOX.Junk" to non-existent mbox by Thunderbird, OVH IMAP server returns INBOX.Junk to LIST command, even though INBOX.Junk doesn't exist on OVH IMAP server.
This may be bug of Dovecot.

Because many IMAP servers who uses Personal Namespace="INBOX." usually have predefined INBOX.Junk at server, this problem was not exposed.
Thanks Wada for pointing out this fact regarding the Trash issue: I was not sure this was another bug or not.

Beside this, my point is: other IMAP client I have experimented with (Cozy Cloud, Gmail, Android Mail) do manage OVH IMAP settings out of the box. Why Thunderbird does not? (I know, I should fix this myself, but I do not have the required skills.)

What about revising Thunderbird Wizard (aka automatic TB parameters setup according to email provider) in order to help non-technical user go through this complicated setup process? This would also be necessary for Yahoo! addresses, as you pointed out.

IMHO increasing ease of use would make Thunderbird more popular. What do you think?
(In reply to David Bourguignon from comment #21)
> Beside this, my point is: other IMAP client I have experimented with (Cozy Cloud, Gmail, Android Mail)
> do manage OVH IMAP settings out of the box.
> Why Thunderbird does not? (I know, I should fix this myself, but I do not have the required skills.)

What do you mean by it?
What IMAP servers are you talking anout? Is "Android Mail" IMAP server?
What IMAP clients(mailers) are you talking about?
Did such IMAP clients surely/actually use INBOX.INBOX.xxx automatically as special folder of the IMAP client?

Is referred "Android Mail" IMAP server? An IMAP client(a mailer), isn't it?
Is the "Android Mail" specialized MailApp for OVH IMAP?
General MailApp on Android? If so, it may be "first found mbox named Trash is treated as trash of the MailApp", "first found mbox named Sent is treated as sent of the MailApp". Or, the MailApp simply uses local folder for it, or uses INBOX.xxx according to Namespace="INBOX." 

If Gmail IMAP, Thunderbird uses XLIST because XLIST capability response is returned,
XLIST command is issued, then Thunderbird can obtain special folder name at imap server.
> * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN
>   X-GM-EXT-1 UIDPLUS ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT LIST-EXTENDED
>   LIST-STATUS LITERAL- APPENDLIMIT=35651584
>
> 4 ID ("name" "Thunderbird" "version" "45.4.0")
> * ID ("name" "GImap" "vendor" "Google, Inc." "support-url" "https://support.google.com/mail"
>      "version" "gmail_imap_161101.08_p0" "remote-host" "240f:7b:a689:1:40b3:660f:54e5:90f1")
>
> 5 xlist "" "%"
> * XLIST (\HasChildren \Inbox) "/" "Inbox"
>
> 6 xlist "" "%/%"
> * XLIST (\AllMail \HasNoChildren) "/" "[Gmail]/All Mail"
> * XLIST (\Drafts \HasNoChildren)  "/" "[Gmail]/Drafts"
> * XLIST (\HasNoChildren \Spam)    "/" "[Gmail]/Spam"
> * XLIST (\HasNoChildren \Trash)   "/" "[Gmail]/Trash"

OVH IMAP doesn't return XLIST nor SPECIAL-USE, so Thunderbird issues LIST command.
> 1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT
> SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN
> NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT
> SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS QUOTA] Logged in
>
> 2 namespace
> * NAMESPACE (("INBOX." ".")) NIL NIL
> 3 ID ("name" "Thunderbird" "version" "45.4.0")
> * ID NIL 	
>
> Because of namespace="INBOX.", Thunderbird doesn't issue LIST "%" for top level mbox.
> 
> 4 list "" "INBOX.%" 	
> * LIST (\Noselect \HasChildren) "." "INBOX.INBOX"
> 4 OK List completed. 	
>
> 5 list "" "INBOX.%.%"
> * LIST (\HasNoChildren) "." "INBOX.INBOX.Drafts"
> * LIST (\HasNoChildren) "." "INBOX.INBOX.Sent"
> * LIST (\HasNoChildren) "." "INBOX.INBOX.Trash"
> * LIST (\HasNoChildren) "." "INBOX.INBOX.Junk"
> 5 OK List completed.
Because "special folder attribute of special folder at IMAP server" is not returned from OVH IMAP, Thunderbird can not know about it.

According to following Gmail's document, XLIST is already obsoleted,
and it's read that there is no need of "SPECIAL-USE" capability response.
 https://developers.google.com/gmail/imap_extensions

However, rfc6154 says that "SPECIAL-USE" capability response is needed.
  https://tools.ietf.org/html/rfc6154
(A) Supporting implementations MUST include the "SPECIAL-USE" capability string
    in response to an IMAP CAPABILITY command.
(B) If the client specifies the "SPECIAL-USE" selection option, 
    the LIST command MUST return only those mailboxes that have a special-use attribute set.
(C) If the client specifies the "SPECIAL-USE" return option,
    the LIST command MUST return the new special-use attributes
    on those mailboxes that have them set.

Why Gmail IMAP still doesn't support "SPECIAL-USE" even though above document was already written by developer people of Gmail?

What can we do even though OVH IMAP server doesn't support the "SPECIAL-USE" capability?

Note:
IIRC, LIST-SECIAL is already supported by Thunderbird.
Even though Gmail IMAP uses Gmail IMAP's XLIST extension and Thunderbird issues XLIST,
"utilizing the special-use attribute by XLIST/LIST-SPECIAL in Thunderbird's special folder setting" is not implemented yet, and it's already requested by a bug in B.M.O.
Currently, following only is done.
- Special folder icon is set to [Gmail]/xxx according to XLIST response.
- This special folder icon of [Gmail]/xxx is independent from Copies&Folderds/Junk setting.
- Even if it's cleared once by changing Copies&Folderds/Junk setting,
  it's set again when XLIST command is issued upon restart.
  
Or, are you talking about following?

Upon first draft save/first mail send,
if INBOX.Drafts, INBOX.Sent is newly created at folder pane of Thunderbird
according to "Drafts/Sent of this account" setting in Copies&Folders of Thunderbird and Namespace="INBOX.",
INBOX.Drafts, INBOX.Sent is not created on OVH IMAP server.
So, it's unable to save draft to INBOX.Drafts, unable to save sent mail in INBOX.Sent,
until other people/mailer creates INBOX.Drafts/INBOX.Sent on OVH IMAP server,
or until the Thunderbird user intentionally requests "create Drafts under INBOX" or "create Sent under INBOX" using this Thunderbird.
(This is same as "NO doesn't exist on server:Junk" case which I already wrote.)
Dear Wada, thanks a lot for your exhaustive testing of the Gmail client in IMAP mode. I did not realized it was not that compatible with OVH IMAP server, in fact.

Beyond Gmail, I mentioned:
  - https://cozy.io/ (a very intuitive web app which has the best behavior regarding to OVH server IIRC)
  - Google Android Email (a native app for smartphone/tablet, check http://arstechnica.com/gadgets/2014/06/google-puts-androids-stock-e-mail-app-in-the-play-store/) which avoids the problem by storing for example sent email in its own directory, not synchronized on the OVH server.

What do you think? Thanks in advance for your help!
David, 

Another TB user has reported a very similar bug using OVH imap server: Bug 1427725. 

I am having a bit of trouble understand the description provided in Bug 12427725 but it sounds very similar what you describe. I don't know if you still care about his or if you are still using Thunderbird with your OVH account, but you mention that you can provide a test account on the OVH server. Maybe you already did but not sure from quick read of comments above. This might be helpful in understanding and resolving this. (I have also asked the other reporter about a possible test account but don't know if he can provide one.)

Thanks,
-gene
Flags: needinfo?(contact)
Never mind, the reporter of Bug 1427725 provided me a test account and I am seeing the problem.
Thanks a lot Gene for your help. This is indeed an issue that has been around for a very long time.
Flags: needinfo?(davidbourguignon.net)
Hi David,
Thanks for the response. Would you mind reading my latest comments on Bug 1427725 ?  
Other than one actual bug that I found, I don't see a problems between what TB shows and what is visible in roundcube. The only "difference" is that roundcube seems to show all the folders, including INBOX, at the same level. But TB show all the folders under INBOX and you can't create a folder at the same level as INBOX. Otherwise, I see exactly the same folder structure in roundcube and tb. 
Am I missing something as to what the problem is? Maybe a localization issue? Note: One of the bugs pointed out by WADA in his long discussions above involving localization of trash folder name has been (mostly) fixed.
Dear Gene, it has been a long time since I reported this bug and I am no longer using neither Roundcube nor Thunderbird, alas. The main point I would like to emphasize is how complicated the settings process is for OVH servers in comparison, for example, with an Orange.fr server I used to also access with Thunderbird in IMAP mode.

In the case of my email address at Orange.fr, it was as simple as ABC and I got a functioning IMAP configuration in a snap. In the case of my email addresses managed by OVH servers, it has always been a real pain, with a chance of messing up completely the set up (so many parameters) and being forced to start all over again. This is what the main problem is, as far as I remember.

Thanks in advance for any improvement to this process!
The reporter doesn't have access to the original server any more and can't provide more necessary detail. So let's assume it's a duplicate of bug 1427725, or least similar, and forward duplicate it there (better than closing it as RESOLVED-INCOMPLETE).
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: