Usermin sets up the mail folders as a mixture of mbox and Maildir on clean Debian Wheezy install

This is on a new Virtualmin installation with install.sh on clean Debian 7 Wheezy, as per https://www.virtualmin.com/documentation/installation/automated

The install has somehow setup Usermin so the mail folders are a mixture of mbox and Maildir. This is the folders for a newly created user:

Inbox: ~/Maildir
Sent mail: ~/mail/sentmail
Drafts: ~/mail/drafts
Drafts (Courier): ~/Maildir/.Drafts
Sent (Courier): ~/Maildir/.Sent
Trash (Courier): ~/Maildir/.Trash

When I click on Sent mail or Drafts I get message:

Failed to open /home/user/mail/sentmail : No such file or directory Failed to open /home/user/mail/drafts : No such file or directory

This is because the directories dont exist as everything is setup for Maildir, as you would expect. When the user then sends an email from Usermin, it ends up writing sent emails into the file ~/mail/sentmail in mbox format, instead of into the ~/Maildir/.Sent folder in Maildir format.

I cant see where the install.sh has gone wrong, as checking the config setting in Webmin show them to be set to Maildir as follows:

Maildir -> Usermin Configuration -> Usermin Module Configuration -> Read mail -> Default user preferences-> Mailboxes directory under home directory = Maildir

Maildir -> Usermin Configuration -> Usermin Module Configuration -> Read mail -> Global module configuration -> Qmail or MH directory in home directory = Maildir

There is no ~/.usermin/mailbox/config for new users. So I assume the settings come from /etc/usermin/mailbox/config which contains:

server_attach=0
no_crlf=0
perpage=20
mail_system=1
shortindex=0
folder_types=local,ext,pop3,imap
from_map=/etc/postfix/virtual
mail_file=mbox
noindex_hostname=1
mail_dir=/var/spool/mail
spam_report=
show_to=0
spam_always=0
wrap_width=80
from_format=1
pop_locks=1
folder_virts=virt,comp
mail_style=0
sendmail_path=/usr/lib/sendmail
top_buttons=1
nologout=1
no_mailer=0
edit_from=1
mail_dir_qmail=Maildir
no_orig_ip=1
send_mode=localhost
pop3_server=localhost
mail_qmail=

The above error is not a major issue for me, as I use Roundcube for most of my users, which does not have this problem. But I thought I should report the error as it seems to be due to a bug in the install on a clean Debian Wheezy.

Status: 
Active

Comments

Where in the UI are the "Sent email" and "Drafts" links that give an error when you click on them?

The "Sent email" and "Drafts" links are on the left pane in the Webmail screen. Where all the folders are listed, below the User Name and user email address.

Odd, it looks like your system is set to access email directly rather than via an IMAP server.

When you mouse over the "Drafts" link, what URL does it show?

I think the simplest fix here is to edit /etc/usermin/mailbox/config and change the mail_system line to mail_system=4 , so that all access is made via your IMAP server, which is presumably configured to use the correct paths.

I'll create a new post, but something similar happened to me too.