Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Empty home variable in dovecot namespace

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/127.0.0.1

Mac OS X Server-OTHER, Mac OS X (10.6.8)

Posted on Jan 26, 2012 10:45 AM

Reply
1 reply

Jan 26, 2012 7:33 PM in response to mcswgn

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

Empty home variable in dovecot namespace

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.