On 14 Nov 2002, Rob Siemborski writes: > On 14 Nov 2002, Scott Douglass wrote: >> I've been wondering for a while if the /etc/imapd.conf option: >> autocreatequota is actually implemented (I'm running 2.1.9 right >> now). It isn't working on any of my servers. No quota is set for >> new user.names.
>> Anyone have any experience with this? It would be handy if it did >> work. > autocreatequota only affects users who log in and create their own > INBOX. Is this how your mailboxes are being created? I started using autocreatequota recently. The 'automatic' mailbox creation *does* work, just not the way I initially and perhaps naively expected it to work. I'm less sure about the automatic setting of a quota, which I agree would be handy. The name of the option is potentially confusing, in that the desired mailbox is not 100% *automatically* created. Rather, it is only created when the new user logs in and issues a CREATE INBOX command. I initially thought the INBOX would be created at login. I think the man page for imapd.conf changed fairly recently to make this clearer (thankyou!). Since some IMAP clients do not seem to issue that CREATE INBOX command upon disovering the lack of an INBOX, mailbox creation is not quite as 'automatic' as it sounds for most users. What we did here was to make a very small edit to our webmail client of choice (Squirrelmail) to check for the existence of the INBOX and issue a CREATE INBOX command at login time if the INBOX does not already exist. So the first time a new user uses webmail, their INBOX is now automatically created for them. This approach will not directly help users who use a commercial IMAP client which doesn't send the CREATE INBOX, unless by policy helpdesk staff use webmail to verify the new account (this check will now have the side-effect of creating the INBOX). Below is the diff against Squirrelmail 1.2.8 sources, in case it would be useful to anyone else. Like Scott, I do not see a quota being set on the newly (auto-)created INBOX here, either in 2.1.9 or in 2.2 from CVS a month or so back, but we have not tracked that down yet -- it might just be some configuration mistake we have made? At least we can add a new user to the LDAP directory, and have them be able to use webmail, with no use of cyradm required. Jonathan ------------------------------------------------------------------------ --- squirrelmail.orig/functions/imap_general.php Tue Sep 17 08:10:03 2002 +++ squirrelmail/functions/imap_general.php Tue Oct 22 17:13:05 2002 @@ -231,6 +231,10 @@ exit; } } + /* Create INBOX if it doesn't exist -- autocreates a new user. [EMAIL PROTECTED] */ + if (!sqimap_mailbox_exists($imap_stream, 'INBOX')) { + sqimap_mailbox_create($imap_stream, 'INBOX', ''); + } return $imap_stream; } ------------------------------------------------------------------------ -- Jonathan Marsden | Internet: [EMAIL PROTECTED] | Making electronic 1252 Judson Street | Phone: +1 (909) 795-3877 | communications work Redlands, CA 92374 | Fax: +1 (909) 795-0327 | reliably for Christian USA | http://www.xc.org/jonathan | missions worldwide