My configuration is this:
mail_driver = maildir mail_path=/mailboxes/%{user} mailbox_list_layout=fs mailbox_directory_name=mbxInternal
After connecting to Dovecot with Thunderbird for the first time, the following directory structure is created:
./dovecot.index.log ./Trash ./Trash/mbxInternal ./Trash/mbxInternal/dovecot.index.cache ./Trash/mbxInternal/cur ./Trash/mbxInternal/dovecot-uidlist ./Trash/mbxInternal/new ./Trash/mbxInternal/tmp ./Trash/mbxInternal/dovecot.index.log ./Trash/mbxInternal/dovecot-keywords ./dovecot.mailbox.log ./dovecot-uidvalidity ./subscriptions ./dovecot-uidvalidity.69245ab1 ./dovecot.list.index.log ./dovecot-uidlist
Trying to copy a mail (using thunderbird) to the Trash will succeed, but trying to copy to INBOX gives the error
Error: Mailbox INBOX: open(/mailboxes/me/tmp/1763990412.M635852P115610.mailstore) failed: No such file or directory
which isn't surprising, the tmp/cur/new directories aren't there.
After creating a subfolder, I have
./tmp ./dovecot.mailbox.log ./dovecot-uidvalidity ./INBOX ./INBOX/subfolder ./INBOX/subfolder/mbxInternal ./INBOX/subfolder/mbxInternal/new ./INBOX/subfolder/mbxInternal/cur ./INBOX/subfolder/mbxInternal/dovecot-uidlist ./INBOX/subfolder/mbxInternal/dovecot.index.log ./INBOX/subfolder/mbxInternal/tmp ./cur ./subscriptions ./dovecot.list.index.log ./Junk ./Junk/mbxInternal ./Junk/mbxInternal/cur ./Junk/mbxInternal/ ./new
all directories are there as expected, and copying to INBOX works as well.
Tested with Dovecot 2.4.1 (Debian13) and Thunderbird 140.5
NB: with mailbox_directory_name and mailbox_list_layout unset, cur/new/tmp directories are created immediately.
Regards Andreas