[Dovecot] Permission problem with LDA and dovecot 2.2.1
Ben Morrow
ben at morrow.me.uk
Thu May 9 03:30:11 EEST 2013
At 9PM +0200 on 8/05/13 you (Tobi) wrote:
> Am 08.05.2013 19:21, schrieb Ben Morrow:
> > At 6PM +0200 on 7/05/13 you (Tobi) wrote:
> >> I tried with removing the base_dir definition from my config, restartet
> >> dovecot and checked with the commands you provided below:
> >> <<
> >> root at nordkap:~# doveconf -d base_dir
> >> base_dir = /usr/local/var/run/dovecot
> >> root at nordkap:~# doveconf base_dir
> >> base_dir = /usr/local/var/run/dovecot
> >> root at nordkap:~# su vmail -s /bin/sh -c "doveconf base_dir"
> >> base_dir = /usr/local/var/run/dovecot
> >> >>
> >> for me it seems that all is build with /usr/local
> > OK, that's odd. I was wondering if you had some permission problem which
> > was stopping the lda from reading the config file, but apparently not.
> Sorry my subject is a bit misleading ;-)
I wasn't confused by the subject: IIRC if LDA can't read a config file,
it will simply ignore it (on the grounds that it is often running as an
ordinary user and so might not be supposed to), meaning that if the
permissions on the config file were too restrictive the LDA running as
vmail might not have seen the base_dir setting. Apparently that's not
the case...
> As I updated today to wheezy anyway I built dovecot again with the
> following options:
> <<
> ./configure --prefix=/usr/local --localstatedir=/usr/local/var
> --with-mysql --with-sql
> make && make install
> >>
> but as well with those after starting dovecot and postfix the errors of
> the lda looking in /var/run occured again.
OK... interesting choice, now you understand why /usr/local/var is not
usually used, but anyway...
> >> But after removing the symlink and restarting dovecot I get the errors again
> >> <<
> >> May 7 17:47:57 nordkap dovecot: lda: Error: userdb lookup:
> >> connect(/var/run/dovecot/auth-userdb) failed: No such file or directory
> >> May 7 17:47:57 nordkap dovecot: lda: Fatal: Internal error occurred.
> >> Refer to server log for more information.
> >> >>
> > Are you sure you're running the right copy of dovecot-lda? I think you
> > mentioned xthread that you have a Debian-provided version installed as
> > well?
> Yes I had the version from apt as well, but removed it today after
> upgrading to wheezy. The lda is called from postfix by these lines in
> master.cf
> <<
> dovecot unix - n n - - pipe
> flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f
> ${sender} -d ${user}@${nexthop}
> >>
> so according to the path prefix it should be the correct copy of
> deliver. Is there a switch to get the version from deliver? I tried the
> usual -v and --version but no success. But even without the version I'm
> 99.99873% sure that the correct binary is used :-)
OK. So the next step is to try running deliver by hand, as vmail,
feeding it a mail from stdin, to see if that fails the same way. If it
does then I would next run it under strace, to see exactly what it's
trying to do and what files it's looking at.
You could also run ldd on deliver, just to make sure it's picking up the
right versions of the dovecot libraries. The hardcoded base_dir path
appears to be baked into libdovecot.so.0, so if you run
strings /path/to/libdovecot.so.0 | grep /var
with the appropriate full path to the library ldd says deliver is using,
you can see which path got baked in.
Ben
Ben
More information about the dovecot
mailing list