Timo Sirainen wrote:
On 6.4.2007, at 17.55, Justin McAleer wrote:

Timo, in rc30, deliver is not creating user directories properly. It looks like it goes straight to creating the maildir, without creating the home directory first if it doesn't exist. It also seems to be doing this before chrooting, as the following errors occur even after manually creating the home directory (with proper permissions):

Apr 6 10:26:23 node7 postfix/qmgr[21815]: D2242D39A5: from=<>, size=556, nrcpt=1 (queue active) Apr 6 10:26:23 node7 deliver([EMAIL PROTECTED]): mkdir(/cur) failed: Permission denied

Looks like deliver doesn't chroot at all if you did chrooting by using /./ in the home directory. Since deliver doesn't work that great chrooted anyway (can't send bounces by running sendmail), maybe this is a good thing.


For the record, I was not using /./ in the home directory. For this user the home directory (and maildir) is /var/mailstore/af/4f/510590. While that may be a good thing, that deliver fails to create a user's maildir is a big problem for me, as I will have to actively provision maildirs for all new accounts before they can receive mail (or be converted)... so for the record, can I no longer count on dovecot to create user directories that don't exist?

Also, the convert plugin seems to assume the home dir exists when it tries to create it's lock file. However, manually creating the home dir does allow convert to continue successfully.

This happens only if it the source storage creation succeeds. So you're moving user's home directory also?


All I'm dealing with here is mail. I'm converting from CommuniGate mailboxes to dovecot, so the whole concept of a home directory is just a technicality. In fact, I was initially just setting users' home to '' and using the mail_location setting to generate the path. The only reason I went back to setting home is because convert seems to create it's lock file in the home dir (so lock creation was failing trying to open /.temp...). Here is what I'm feeding to convert:

convert_mail = mbox:/var/mailstore/%d/%1n.sub/%1.1n.sub/%n.macnt:INBOX=/var/mailstore/%d/%1n.sub/%1.1n.sub/%n.macnt/INBOX.mbox

And an example of the user's home/maildir:

/var/mailstore/af/4f/510590
mail_location = maildir:%h:INDEX=/var/indexes/%2Mi/%2.2Mi/%i

The index location here would be /var/indexes/af/4f/510590 (local disk).

One of the source hacks I've made for the CommuniGate format was setting a mask of *.mbox rather than just * when calling the mail_storage_mailbox_list_init functions... I didn't think that could cause a problem like this though. I also strip off the .mbox extension, and any occurance of .folder in the dest_name string in mailbox_name_convert(). All of that works perfectly so far in my testing, though, as long as the user's home directory already exists :)


Anyway, I don't think I'll be changing any of this code in v1.0 branch. But the subscription name changing .. yea, I'll fix that for v1.0. Guess I'll still have to put out rc31 :(


--
Justin McAleer
Director of Development
Neonova Network Services

Reply via email to