[Dovecot] Turning on autocreate of maildirs - how?

Graham Leggett minfrin at sharp.fm
Tue Mar 11 17:32:41 UTC 2014


On 11 Mar 2014, at 6:25 PM, Graham Leggett <minfrin at sharp.fm> wrote:

> For years the trailing slash has indicated the mailbox format as maildir, and dovecot has been happily autodetecting these maildirs without a problem.
> 
> In our case in addition to dovecot we have a combination of postfix and a legacy courier-imap, how will these the be affected by the addition of "maildir:"?
> 
> What I don't understand is why autocreate is ignoring the long standing convention that the trailing slash indicates maildir, and whether this is intentional or whether there is some reason for it.

Giving the different prefix a try on a test account, a mailbox directory is created, but the rest of the maidir directories (new, cur, tmp) aren't created, and the error below is returned.

The key is the message "Error: user test at sharp.fm: Initialization failed: namespace configuration error: There can be only one namespace with inbox=yes"

Mar 11 17:27:20 monica dovecot: imap: Debug: Added userdb setting: mail=maildir:/home/vmail/test at sharp.fm/
Mar 11 17:27:20 monica dovecot: imap(test at sharp.fm): Debug: Effective uid=517, gid=517, home=
Mar 11 17:27:20 monica dovecot: imap(test at sharp.fm): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/home/vmail/test at sharp.fm/
Mar 11 17:27:20 monica dovecot: imap(test at sharp.fm): Debug: maildir++: root=/home/vmail/test at sharp.fm, index=, indexpvt=, control=, inbox=/home/vmail/test at sharp.fm, alt=
Mar 11 17:27:20 monica dovecot: imap(test at sharp.fm): Debug: Namespace : type=private, prefix=INBOX., sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/home/vmail/test at sharp.fm/
Mar 11 17:27:20 monica dovecot: imap(test at sharp.fm): Debug: maildir++: root=/home/vmail/test at sharp.fm, index=, indexpvt=, control=, inbox=/home/vmail/test at sharp.fm, alt=
Mar 11 17:27:20 monica dovecot: imap(test at sharp.fm): Error: user test at sharp.fm: Initialization failed: namespace configuration error: There can be only one namespace with inbox=yes
Mar 11 17:27:20 monica dovecot: imap(test at sharp.fm): Error: Invalid user settings. Refer to server log for more information.

I have two namespaces defined, I am assuming this is wrong:

namespace inbox {
  inbox = yes
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Sent {
    auto = subscribe # autocreate and autosubscribe the Sent mailbox
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    auto = no
    special_use = \Sent
  }
  mailbox Junk {
    auto = create # autocreate Spam, but don't autosubscribe
    special_use = \Junk
  }
  mailbox virtual/All { # if you have a virtual "All messages" mailbox 
    auto = no
    special_use = \All
  }
}

namespace {
  type = private
  separator = .
  prefix = INBOX.
  inbox = yes
}

Regards,
Graham
--



More information about the dovecot mailing list