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.
Comments
Submitted by ElectronicFur on Thu, 01/29/2015 - 18:05 Comment #1
I just saw another user, dubravko also reported this exact same error on the forum, also on Debian Wheezy, see http://www.virtualmin.com/node/35887
Submitted by JamieCameron on Fri, 01/30/2015 - 18:12 Comment #2
Where in the UI are the "Sent email" and "Drafts" links that give an error when you click on them?
Submitted by ElectronicFur on Fri, 01/30/2015 - 18:56 Comment #3
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.
Submitted by JamieCameron on Sat, 01/31/2015 - 18:43 Comment #4
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?
Submitted by ElectronicFur on Mon, 02/02/2015 - 14:39 Comment #5
The URL for Drafts is https://servername.com:20000/mailbox/index.cgi?id=/home/servername/homes...
But the URL for Inbox is https://servername.com:20000/mailbox/index.cgi?id=/home/servername/homes...
Submitted by JamieCameron on Mon, 02/02/2015 - 23:47 Comment #6
I think the simplest fix here is to edit
/etc/usermin/mailbox/config
and change themail_system
line tomail_system=4
, so that all access is made via your IMAP server, which is presumably configured to use the correct paths.Submitted by paulzag on Sun, 03/20/2016 - 03:39 Pro Licensee Comment #7
I'll create a new post, but something similar happened to me too.