On Mon, 2009-12-07 at 10:26 +0200, Mark Zealey wrote: > I'm a little confused by the following statement on that page: > > If you were using e.g. mail_location = maildir:/var/mail/%h, just change > it to mail_location = maildir:%h and add /var/mail/ prefix to home dirs. > > However, looking at the patch > (http://hg.dovecot.org/dovecot-1.2/rev/dd49cf3fd2c9) and a bug report > (http://www.dovecot.org/list/dovecot/2009-July/041151.html) it seems to > be more requiring the mail location path to start with a / ? ie the case > the bug is with something like: > > mail_location = maildir:foo/bar/%h
The patch explicitly checks that home dir (%h) starts with '/'. It doesn't check mail_location. Perhaps there should be a check for mail_location too, but it hasn't been a real problem yet so I haven't added code to prevent it. Relative home paths were causing real problems. > which would cause problems (looking at the patch in previous versions it > would have treated the above as /foo/bar/%h) ? Probably not. It probably would have first tried to chdir to %h, which being a relative path wouldn't exist, so it would fallback to chdiring /tmp. So it would probably have used /tmp/foo/bar/%h. > I'm asking because I'd like to confirm that the following works > correctly on v1.2 (in my tests it seems to): > > mail_location = maildir:~/Maildir:INDEX=/var/dovecot/%h > > ie putting index's elsewhere (but based on home directory path rather > than the more traditional user/domain) That looks fine, since the home directory is an absolute path.
signature.asc
Description: This is a digitally signed message part