1 Reply Latest reply: Jan 26, 2012 7:33 PM by mcswgn
mcswgn Level 1 (0 points)

We are switching to a MacOS X Server and to aid in getting mail from the old hardware/platform (mbox format) to the new I defined the following namespaces in dovecot.conf on the Mac OS X Server:


namespace private {

  separator = /

  prefix =

  location =

  inbox = yes

  subscriptions = yes


namespace private {

  separator = /

  prefix = "Old Mail/"

  location = mbox:~/OldMail

  inbox = no

  list = yes

  subscriptions = yes

  hidden = no



The second namespace uses a location path that references the user's home directory: '~/OldMail'. This produces the following error in the system log:


Jan 26 13:02:50 tmpser dovecot[82962]: IMAP(*): Namespace 'Old Mail/': mbox: mkdir(/OldMail) failed: Permission denied (euid=501(mcswgn) egid=20(staff))


Note that it is trying to create /OldMail instead of /Users/mcswgn/OldMail. If the path is changed to '%h/OldMail', then the error is:


Jan 26 13:10:48 tmpser dovecot[83347]: Fatal: userdb didn't return a home directory, but mail location used it (%h): %h/OldMail


On the other hand, if the path is  '/Users/%n/OldMail', then dovecot will correctly create /Users/mcswgn/OldMail and everything works (although, this won't be a viable workaround because ultimately users will not all be located in one directory).


Any idea why the system isn't picking up the value of the home directory? I should add that this user is in the local directory, but the same happens for a user in /LDAPv3/

Mac OS X Server, Mac OS X (10.6.8)
  • mcswgn Level 1 (0 points)

    Decided to go ahead and upgrade to Lion server (10.7.2) and now the error is a little more explicit (with path '~/OldMail'), but still leaves the question of why it isn't setting the home directory:



    Jan 26 22:28:10 tmpser dovecot[10073]: imap(pid 10727 user mcswgn): Error: user mcswgn: Initialization failed: Namespace 'Old Mail/': Home directory not set for user. Can't expand ~/ for mail root dir in: ~/OldMail