Welcome, Guest
Please Login or Register.
Lost Password?
Re: Creation of mail folders (1 viewing)
Post Reply

TOPIC: Re: Creation of mail folders

#2460
jpenix (User)
Posts: 31
graphgraph
Creation of mail folders 2006/08/03 00:05  
I'd like all new mail users to automatically have a Trash and Sent folder set up in their Maildir so that IMAP clients like Thunderbird will automatically use them. I didn't see an obvious way to do this in Virtualmin... suggestions?

Also I notice that even though my system is set up to use Maildir, every mail user also winds up with an empty "mail" directory in their home. Is this a bug I should report? Or have I just overlooked a setting somewhere?
  The administrator has disabled public write access.
#2491
jpenix (User)
Posts: 31
graphgraph
Re: Creation of mail folders 2006/08/09 21:13  
Just a bump hoping for some ideas.
  The administrator has disabled public write access.
#2497
ADobkin (User)
Posts: 183
graphgraph
Re: Creation of mail folders 2006/08/10 15:29  
I think there are several ways to have these files automatically created with the user account. One way might be to put them in /etc/skel. Another way might be to use the "Before and after commands" in the Webmin Users and Groups module configuration to specify that these files be created. I remember Jamie posting some sample code to the Webmin list about this a while back, but I don't have it handy right now.

Regarding your second paragraph, I have this same question/problem also. I reported it several months ago and got the response that Maildir is used for the inbox, while mail is used for other saved mailboxes. This didn't quite make sense to me at the time, but I forgot to pursue it until you brought it up again. Actually, I think having both of these folders has caused confusion in the Usermin Read User Mail module, because none of the user mailboxes in the Maildir directory show up there. I'm sure there is a way to reconfigure it and fix this, but my system (and probably yours too) was set up with the defaults, so I thought it should work properly out of the box. So, in this light, I would say yes, it probably should be considered a bug, at least in the installer.

Aha, I just found the bug I reported,[A HRef="http://www.Virtualmin.com/bug-tracker/bug?bug_number=65">Bug #65.
  The administrator has disabled public write access.
#2499
jpenix (User)
Posts: 31
graphgraph
Re: Creation of mail folders 2006/08/10 18:13  
Thanks Alan. I tried setting up my Maildir structure in /etc/skel, but apparently Virtualmin doesn't use that to set up new mail/ftp user home directories (I don't get a .bashrc either). I'll look at doing something in a script and triggering it on user creation, but it seems like this is something that should be done by Virtualmin. It autocreates the $HOME/mail directory that you refer to in your bugreport, so I'm hoping it can be told to create additional user-specified directories or files.

On the subject of your bugreport, I'm also dissatisfied with the way the Usermin mail module deals with Maildirs. I see they fixed it so that now you can at least see the messages in the Inbox, but it still remains configured to put drafts and sent items into $HOME/mail instead of the common $HOME/Maildir/.Sent and .Drafts. This would be very annoying to a user who sometimes uses an IMAP client like Thunderbird but also uses the webmail - they'd wind up with sent items in two different locations.

An additional flaw in the Usermin mail module is that it exposes mail server working files like maildircache and subscriptions to the user. Very confusing and I don't know what the purpose is.
  The administrator has disabled public write access.
#2500
Joe (Admin)
Posts: 4213
graph
Re: Creation of mail folders 2006/08/10 23:54  
Hey guys,

I agree that some of this stuff is a bit confusing. I've asked Jamie to drop in and give us the scoop on getting Usermin to behave a bit more sociably. I suspect our installer is probably missing a step or two in configuring Usermin to play well with Maildir.
  The administrator has disabled public write access.
#2501
JamieCameron (Admin)
Posts: 374
graphgraph
Re: Creation of mail folders 2006/08/11 00:43  
If you want to get Usermin and IMAP to work nicely together, the best solution is to configure it to use ~/Maildir as both the inbox and the location of sub-folders. This can be done as follows :

1) Login to Webmin as the master administrator, and go to the Usermin Configuration module.
2) Click on the Usermin Module Configuration icon.
3) Click on Read Mail.
4) Change the 'Mailboxes directory under home directory' field to Maildir, and click Save.

  The administrator has disabled public write access.
#2502
Joe (Admin)
Posts: 4213
graph
Re: Creation of mail folders 2006/08/11 01:04  
Hey Jamie,

Any reason we're not setting this up by default, during installation?
  The administrator has disabled public write access.
#2561
ADobkin (User)
Posts: 183
graphgraph
Re: Creation of mail folders 2006/08/19 11:08  
I followed Jamie's instructions, but still was only able to access the user's Inbox from the Read User Mail module. Eventually, I discovered that there are separate module config options for the[Em>Webmin Read User Mail module (vs. the one in Usermin). I had to set this module to use "Maildir" in at least these three fields (and I'm not sure exactly how they differ):

User mail file directory: Maildir
Mail directory in user home directories: Maildir
Usermin-style folders subdirectory in home directory: Maildir

In addition, there is another option "Mail file in user home directories", currently set to "Mailbox". I have no idea what this option is for and what it should be set to.

These various options in multiple places are quite confusing, to say the least, and the defaults are definitely not set right for Virtualmin Professional users.
  The administrator has disabled public write access.
#2562
Joe (Admin)
Posts: 4213
graph
Re: Re: Creation of mail folders 2006/08/19 11:32  
Hehehe! That's frightening. Sometimes I feel like biting Webmin because it has too many options. The problem is that everyone wants to be able to tweak just one knob...but everyone wants a different one to tweak, so we end up with thousands of options and everybody only ever uses one or two of them. It's featuritis, and it's darned hard to fight. Everyone seems so reasonable when they say, "I need to be able to change X because I've got Y running over here and it wants Z to look like this." And if we argue, "no, we're not adding any more options", we're tyrants an unresponsive to users. Ah, the joys of Open Source...everybody does it their own way, and we have to help them. ;-)

The good news is that in Virtualmin Professional we do have the ability to get it right by default. So, that's what we're going to do. I believe the next virtualmin-base package that I'm rolling out in the next day or two has this setup correctly (but I'm going to test it and keep poking at it until it is right, if it isn't). This is definitely one of the things keeping folks from adopting Usermin for webmail--I've had folks explaining that it was because Usermin doesn't support IMAP (it does), Maildir (it does), multiple folders (it does), shared sent/trash/etc. with IMAP (it does). But since it's so darned hard to get it configured right, folks can't possibly be blamed for thinking it doesn't!

Anyway, thanks for hashing this one out guys.
  The administrator has disabled public write access.
#2563
ADobkin (User)
Posts: 183
graphgraph
Re: Creation of mail folders 2006/08/19 14:10  
I definitely understand the creeping featuritis and can sympathize. But there is a cure! Several things can be done to improve the situation, as you alluded to, and I'm very glad that you are taking that path.

The best and most important cure of all is to first set the defaults properly for the majority of users. That way, they hopefully won't even need to go in and mess with these settings at all. Fortunately, this should be very easy to achieve in Virtualmin Professional, since we are starting with a known supported environment (i.e. Postfix, Dovecot, Maildir, etc.).

If users do mess with the settings, either because they have a slightly different-than-average need or just like to tweak things, then the next best cure is to organize the configuration layout so that only the basic and most frequently-changed options appear at first. Then, they can change settings without having to worry about totally screwing things up accidentally. For those advanced users that really need to change the more obscure settings, there should be an "advanced" or "expert" area, with the caveat that those settings should only be changed "if you really know what you're doing!"

The final cure (sad that this is a last resort) is that these options need to be documented. None of the configurable options in the Webmin or Usermin Read Mail modules have clickable help text. So, it is anyone's guess what some of these obscure options really do.

I have to agree that this is one of the main reasons why people don't use Usermin for webmail. I have implemented several different webmail clients over the past ten years or so, and Usermin has certainly been the hardest one to set up properly, at least when Maildir is involved. This doesn't need to be the case, since it is so flexible as you've pointed out. So, we need to get these featuritis cures (appropriate defaults, better layout of config options, and help text) implemented to make Usermin a more feasible option. (And, ironically, we also need to[Em>add a few new features to make it more competitive with some of the more mature, well-polished popular clients.)

One other suggestion that has been made already is that Usermin should just rely on the IMAP server to provide its mail, as virtually every other webmail client does. This would completely eliminate a lot of these confusing options, since they are already properly set and handled by the IMAP server. In other words, Usermin shouldn't need to know and the user shouldn't care whether the mail store is using mbox, Maildir, or something completely different. (That's why most other mail clients don't suffer from this complexity.) All it needs to know is what IMAP server is being used, and the mail folders list is pretty much automatic at that point. So, this begs the question: [Em>Why not just set up Usermin for IMAP by default?
  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.