[Dovecot] problem with folder creation

John Watson JohnWa at azasrs.gov
Thu Oct 28 20:40:43 EEST 2010


OK I tried that and it still isn't working as expected. I added configuration like this to dovecot.conf ( and restated dovecot):

plugin {
  # Here you can give some extra environment variables to mail processes.
  # This is mostly meant for passing parameters to plugins. %variable
  # expansion is done for all values.
  autocreate = INBOX.Trash
  autocreate2 = INBOX.Drafts
  autosubscribe = INBOX.Trash
  autosubscribe2 = INBOX.Drafts


My new accounts are getting folders like this:

drwx------  2 postfix  postfix  512 Oct 28 10:33 cur
-rw-------  1 postfix  postfix   17 Oct 28 10:33 dovecot-uidlist
-rw-------  1 postfix  postfix    8 Oct 28 10:33 dovecot-uidvalidity
-rw-------  1 postfix  postfix    0 Oct 28 10:33 dovecot-uidvalidity.4cc9b3dc
-rw-------  1 postfix  postfix  156 Oct 28 10:33 dovecot.index.log
drwx------  2 postfix  postfix  512 Oct 28 10:33 new
drwx------  2 postfix  postfix  512 Oct 28 10:33 tmp

what I would like to see is them getting folders like this:

drwx------  5 postfix  postfix  512 Oct 27 16:33 .INBOX.Drafts
drwx------  5 postfix  postfix  512 Oct 27 16:33 .INBOX.Sent
drwx------  5 postfix  postfix  512 Oct 27 16:33 .INBOX.Trash
drwx------  2 postfix  postfix  512 Oct 27 16:33 cur
-rw-------  1 postfix  postfix   17 Oct 27 16:33 dovecot-uidlist
-rw-------  1 postfix  postfix    8 Oct 27 16:33 dovecot-uidvalidity
-rw-------  1 postfix  postfix    0 Oct 27 16:33 dovecot-uidvalidity.4cc8b6bb
-rw-------  1 postfix  postfix  156 Oct 27 16:33 dovecot.index.log
drwx------  2 postfix  postfix  512 Oct 27 16:33 new
-rw-------  1 postfix  postfix   36 Oct 27 16:33 subscriptions
drwx------  2 postfix  postfix  512 Oct 27 16:33 tmp

It seems to work with these 100K users that I created as part of a bulk create operation against mysql. The new accounts that I create one at a time seem to behave differently.
I can't see any difference in the database rows. 
Another option that I am considering at this point is to create these folders manually at the same time that I insert the account into mysql. Assuming I have a good template and get 
the folder permissions and ownership right is there a problem with that approach?



-----Original Message-----
From: dovecot-bounces+johnwa=azasrs.gov at dovecot.org [mailto:dovecot-bounces+johnwa=azasrs.gov at dovecot.org] On Behalf Of Arne K. Haaje
Sent: Thursday, October 28, 2010 3:27 AM
To: dovecot at dovecot.org
Subject: Re: [Dovecot] problem with folder creation

Torsdag 28. oktober 2010 01.58.31 skrev John Watson :
> I am running dovecot 1.2.12 on Free BSD 8.1. We also have postfix and a
> version of squirrelmail for the UI.  We are using MySql database to store
> the email account info. I wrote a script to insert about 100K users into
> mysql. Those accounts seem to work well and I'm able to see things like
> 'Drafts', 'Trash' and 'Sent'. Now I am working on code to create new
> accounts - one at a time. The accounts get created and I can send and
> receive email from them but when I go go Drafts, Sent or Trash I get an
> error that says:
> 
> ERROR: Could not complete request.
> Query: SELECT "INBOX.Drafts"
> Reason Given: Mailbox doesn't exist: INBOX.Drafts
> 
> When I go out and look at the mailbox folders for these users I only see
> "cur", "new", and "tmp" whereas on other accounts that work well I also
> see things like INBOX.Drafts etc. I have examined the sql that is
> inserting the accounts in bulk versus the one by one case and can not see
> any differences (other than a new mailbox name/password etc). Everything
> that I'm reading online indicates that Dovecot should just create these
> extra folders on the server and there is really nothing for either an
> admin or a user to do. Does anyone have any more information on this?
> 
>  Thanks in Advance
> John Watson

This may not be exactly what you are looking for, but the auto-create plugin 
can create the folders for you upon login first time to the account.

http://wiki1.dovecot.org/Plugins/Autocreate

plugin {
  autocreate = Trash
  autocreate2 = Junk
  autocreate3 = Sent
  autocreate4 = Drafts
  autosubscribe = Trash
  autosubscribe2 = Junk
  autosubscribe3 = Sent
  autosubscribe4 = Drafts
}

-- 
--------------------------------
Arne K. Haaje   | www.drlinux.no
T: 69 51 15 52  | M: 92 88 44 66
--------------------------------




More information about the dovecot mailing list