Server Error: UID MOVE: Mailbox doesn't exist: Trash

I've created a fresh Virtualmin system based on CentOS 7, a virtual server and an e-mail account on it. I then created Rouncube interface and logged into the e-mail account and tried to delete a test message in inbox to see the following error message:

An error occurred!
close
Server Error: UID MOVE: Mailbox doesn't exist: Trash

Re-creating everything didn't address the issue - it repeats every time.

Status: 
Closed (fixed)

Comments

Strange enough, but it started delete messages after I manually renamed 'trash' folder to 'Trash' within Roundcube. So then I renamed all other folders begining with small letters to capital letters, except one: 'sent', because there was already the 'Sent' folder. These two folders were duplicated by default.

It sounds like Roundcube is making assumptions about which folders should exist. There isn't much Virtualmin can do to fix this though...

Hmm, which RoundCube version is it that you're using there?

Virtualmin Install Scripts page shows:

RoundCube 1.1.2-complete

and here is the evidence of duplicated folders existing in the very beginning: please see screenshot.

Could this be this because I've changed the "Subdirectory for mailbox user home directories" setting to "mailboxes" on the "Defaults for new domains" page?

Have deployed completely fresh Virtualmin guest system with all the default settings, created a virtual server, logged into Roundcube with default username for the website to see the following folders only created correctly:

Inbox
Drafts
Sent
Trash

If I create a new e-mail user then it shows one more additionally created folder 'spam' beginning with small letter:

Inbox
Drafts
Sent
Trash
spam

Then I went ahead and changed the "Subdirectory for mailbox user home directories" from "homes" to "mailboxes", created an e-mail account to see only:

Inbox
Drafts
Sent
Trash
spam

and all is working fine. So here I am thinking on two issues:

(1) How come on my initially reported guest system it always creates:

Inbox
drafts
sent
spam
trash

instead of

Inbox
Drafts
Sent
Trash
spam

?

(2) After changing "Subdirectory for mailbox user home directories" setting to "mailboxes" it shows newly created directory belonging to "root" rather than website username:

l
total 40
drwxr-xr-x  2 beret beret 4096 Jun 11 15:47 awstats
drwxr-x---  2 beret beret 4096 Jun 11 15:47 cgi-bin
drwxr-xr-x  3 beret beret 4096 Jun 11 15:47 etc
drwxr-xr-x  2 beret beret 4096 Jun 11 15:47 fcgi-bin
drwxr-xr-x  4 beret beret 4096 Jun 11 16:04 homes
drwxr-x---  2 beret beret 4096 Jun 11 15:47 logs
drwxr-xr-x  3 root  root  4096 Jun 11 16:08 mailboxes
drwx------  8 beret beret 4096 Jun 11 15:53 Maildir
drwxr-x--- 14 beret beret 4096 Jun 11 15:49 public_html
drwxr-x---  2 beret beret 4096 Jun 11 15:47 tmp

In fact, the second issue can be ignored, because it attributes to "root" only you change this with already existing virtual server and create an e-mail account for it. It attributes the "mailboxes" directory to the correct website username if the website is created after the "Subdirectory for mailbox user home directories" was set to new value. This is minor, but still an issue as some Virtualmin user could change this setting for already existing website and hit this problem.

However, the question # (1) still remains - I can't figure out why my initially reported virtual server creates mail folders beginning with small letters (instead of default capital letters)and those folders are not functional.

I finally found the source of issue. On "Actions upon server and user creation" the defaults are set to Trash, Drafts and Sent and on the initially reported guest system they were all set to trash, drafts and sent. While this issue has been addressed by reverting to the default settings on this page, I would like to request to either:

(1) make Rouncube setups on Virtualmin servers to work with modified names for new mailboxes

or

(2) remove any alternatives leaving the chosen by default folders (Trash, Drafts and Sent)

to save Virtualmin users from hitting this issue and spending time to troubleshoot this.

I hope you agree the Virtualmin settings should not be conflicting with scripts like Roundcube or there are such conflicts then they should be addressed by default.

Can Roundcube be configured to use different trash/drafts folder names though?

I don't know. IT could. But my logic is that most of Virtualmin users will expect for RoundCube script to start working out of the box. However, it won't if those folders had been set to ones which begin with small letters or custom values on the Virtualmin side. So Virtualmin users should be saved from this troubles either:

(1) by making Virtualmin to set only acceptable for RounCube values;

or

(2) by modifying RoubdCube script, shipped from Virtualmin repositories, to work with customer folder names.

Ok, I figured out how to do this, and will release an update to the Roundcube installer to use the correct paths by default (this should be auto-downloaded by your system in at most 1 day).

Automatically closed -- issue fixed for 2 weeks with no activity.