[Dovecot] problem with folder creation

Timo Sirainen tss at iki.fi
Tue Nov 2 17:12:41 EET 2010


On Thu, 2010-10-28 at 10:40 -0700, John Watson wrote:
> 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

You also need to enable autocreate plugin by setting

mail_plugins = autocreate

> 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

Uh. You really shouldn't be doing it like that.. More likely what you
want is to not have the INBOX. prefix but rather make that the entire
namespace:

namespace private {
  prefix = INBOX.
  sep = .
  inbox = yes
}

> 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.

Well, if 100k users already have those .INBOX.* mailboxes then I guess
you can't really change it anymore. But it just wasn't meant to be done
like that.

> 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?

No, that's actually the preferred method. The autocreate plugin wastes
disk i/o at the beginning of each connection because it has to check if
the mailboxes exist.



More information about the dovecot mailing list