I retried my test with raw IMAP logging in effect. Each test involved importing about 900 messages into an empty account on my Dovecot server, using the Larch program.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
When I use the mdbox format, there are a bunch of LIST and LSUB commands whose responses mention INBOX.Trash with the \Noselect and \HasChildren flags (the Trash folder for this particular account happens to contain subfolders). Before trying to save a message in the Trash folder, the client did a "SUBSCRIBE INBOX.Trash" (which succeeded) followed by a "STATUS INBOX.Trash" (which failed with "NO Mailbox doesn't exist").
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
When I use the Maildir format, the raw log never mentions the \Noselect flag in connection with the INBOX.Trash folder. Before trying to save a message in the Trash folder, the client did a "CREATE INBOX.Trash", "SUBSCRIBE INBOX.Trash", "STATUS INBOX.Trash", and "SELECT INBOX.Trash" -- all of which succeeded -- and then an "APPEND INBOX.Trash" command was given, which also succeeded.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
So, with the mdbox format, Larch did not CREATE the folder before trying to SELECT it. And Dovecot was flagging INBOX.Trash with a \Noselect flag (which was not the case with the Maildir format).
I'm not familiar enough with Dovecot or IMAP to know exactly what this difference means, but hopefully it will reveal something to someone here. Let me know if you need to see other stuff in these raw logs that I didn't mention here.
Rich Wales richw@richw.org