[Dovecot] Permission problem with LDA and dovecot 2.2.1
Hello list
today I built dovecot 2.2.1 from sources. But I have permission problems with LDA The "normal" imap part works fine, users can login and see their boxes. deliver is called as LDA from postfix master.cf as follows << dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
but when I try to send a testmail then I get the following in the logs
<< 2013 May 6 18:37:59 nordkap lda: Fatal: Internal error occurred. Refer to server log for more information. May 6 18:37:59 nordkap dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Connection refused May 6 18:37:59 nordkap dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.
For me it looks odd because the auth-userdb is defined as << base_dir = /usr/local/var/run/dovecot/ service auth { unix_listener auth-userdb { mode = 0777 user = vmail group = vmail } ....
The rights on the file should be correct according to the config above << ls -al /usr/local/var/run/dovecot/auth-userdb srwxrwxrwx 1 vmail vmail 0 May 6 20:11 /usr/local/var/run/dovecot/auth-userdb
I grepped through all the configfiles but could not find the "wrong"
I cannot explain why the lda tries to access << Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) path from the error message above. Would it might be a "fix" to symlink /usr/local/var/run/dovecot to /var/run/dovecot ? Or would that break something with dovecot?
Thanks for any hint or idea
tobi
On Mon, 2013-05-06 at 20:24 +0200, Tobi wrote:
Hello list
today I built dovecot 2.2.1 from sources. But I have permission problems with LDA The "normal" imap part works fine, users can login and see their boxes. deliver is called as LDA from postfix master.cf as follows << dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
I'd change deliver to dovecot-lda , at present IIRC its a symlink, so it might "go away" one day, otherwise, that's fine.
May 6 18:37:59 nordkap dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Connection refused
For me it looks odd because the auth-userdb is defined as << base_dir = /usr/local/var/run/dovecot/ service auth { unix_listener auth-userdb { mode = 0777 user = vmail group = vmail }
777? it should be 0600, however, the problem might be easier to tell with output of dovecot -n
At 8PM +0200 on 6/05/13 Tobi wrote:
<< 2013 May 6 18:37:59 nordkap lda: Fatal: Internal error occurred. Refer to server log for more information. May 6 18:37:59 nordkap dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Connection refused May 6 18:37:59 nordkap dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.
For me it looks odd because the auth-userdb is defined as << base_dir = /usr/local/var/run/dovecot/
Why are you trying to put this under /usr/local? /usr/local/var is not a usual place to put things on Unix systems: generally speaking programs installed under /usr/local use /var just like those installed under /usr.
service auth { unix_listener auth-userdb { mode = 0777
This probably shouldn't be world-readable.
user = vmail group = vmail
} ....
The rights on the file should be correct according to the config above << ls -al /usr/local/var/run/dovecot/auth-userdb srwxrwxrwx 1 vmail vmail 0 May 6 20:11 /usr/local/var/run/dovecot/auth-userdb
I grepped through all the configfiles but could not find the "wrong"
I cannot explain why the lda tries to access << Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) path from the error message above.
Probably your Dovecot binaries are built with a default base_dir of /var/run/dovecot. What do the following give you?
doveconf -d base_dir (as root)
doveconf base_dir (as root)
doveconf base_dir (as vmail:vmail)
Would it might be a "fix" to symlink /usr/local/var/run/dovecot to /var/run/dovecot ? Or would that break something with dovecot?
It probably won't break anything, but why don't you just use /var/run/dovecot in the first place and take that base_dir definition out of dovecot.conf?
Ben
At 8PM +0200 on 6/05/13 Tobi wrote:
<< 2013 May 6 18:37:59 nordkap lda: Fatal: Internal error occurred. Refer to server log for more information. May 6 18:37:59 nordkap dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Connection refused May 6 18:37:59 nordkap dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.
For me it looks odd because the auth-userdb is defined as << base_dir = /usr/local/var/run/dovecot/ Why are you trying to put this under /usr/local? /usr/local/var is not a usual place to put things on Unix systems: generally speaking programs installed under /usr/local use /var just like those installed under /usr. Ah this would explain why always /var/run is used. service auth { unix_listener auth-userdb { mode = 0777 This probably shouldn't be world-readable. I just set world-writeable to see which file under /var/run or /usr/local/var/run is affected. So was just for testing purposes. user = vmail group = vmail } ....
The rights on the file should be correct according to the config above << ls -al /usr/local/var/run/dovecot/auth-userdb srwxrwxrwx 1 vmail vmail 0 May 6 20:11 /usr/local/var/run/dovecot/auth-userdb
I grepped through all the configfiles but could not find the "wrong"
I cannot explain why the lda tries to access << Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) path from the error message above. Probably your Dovecot binaries are built with a default base_dir of /var/run/dovecot. What do the following give you?
doveconf -d base_dir (as root) doveconf base_dir (as root) doveconf base_dir (as vmail:vmail)
Would it might be a "fix" to symlink /usr/local/var/run/dovecot to /var/run/dovecot ? Or would that break something with dovecot? Yesterday I "fixed" it with a symlink. But I think better doing as you described and use /var/run/ I will remove my definition this evening and see if everything works fine if only using /var/run I just thought I "have" to use /usr/local/var/run because /usr/local is
Am 07.05.2013 02:21, schrieb Ben Morrow: the prefix while building dovecot from source.
It probably won't break anything, but why don't you just use /var/run/dovecot in the first place and take that base_dir definition out of dovecot.conf?
Ben
Thanks for your help I will try this evening
Am 07.05.2013 07:39, schrieb Tobi:
Am 07.05.2013 02:21, schrieb Ben Morrow:
At 8PM +0200 on 6/05/13 Tobi wrote:
<< 2013 May 6 18:37:59 nordkap lda: Fatal: Internal error occurred. Refer to server log for more information. May 6 18:37:59 nordkap dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Connection refused May 6 18:37:59 nordkap dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.
i hope you did not forget to add the needed users with compile from source i.e with
adduser --system --group --no-create-home --disabled-login --force-badname dovenull
adduser --system --group --no-create-home --disabled-login --force-badname dovecot
adduser --no-create-home --disabled-login --gecos vmail vmail
Best Regards MfG Robert Schetterer
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
Hi Robert
yes all these users/groups are currently present (and were so before compiling) But as I could "fix" the problem with a symlink I won't spend much more time in finding the root cause. It works and I'm happy. It's just my private server where I know the only customer very well ;-)
Cheers
tobi
Am 07.05.2013 08:49, schrieb Robert Schetterer:
Am 07.05.2013 07:39, schrieb Tobi:
Am 07.05.2013 02:21, schrieb Ben Morrow:
At 8PM +0200 on 6/05/13 Tobi wrote:
<< 2013 May 6 18:37:59 nordkap lda: Fatal: Internal error occurred. Refer to server log for more information. May 6 18:37:59 nordkap dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Connection refused May 6 18:37:59 nordkap dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information.
i hope you did not forget to add the needed users with compile from source i.e with
adduser --system --group --no-create-home --disabled-login --force-badname dovenull
adduser --system --group --no-create-home --disabled-login --force-badname dovecot
adduser --no-create-home --disabled-login --gecos vmail vmail
hi Ben
for me it seems that all is build with /usr/local 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.
I checked all the configs again for any path to /usr/local and found nothing (which is not commented out) that would affect basedir << root@nordkap:~# find /usr/local/etc/dovecot/ -type f -exec grep -H /usr/local/ {} \; /usr/local/etc/dovecot/README:/usr/local/share/doc/dovecot/example-config/ /usr/local/etc/dovecot/dovecot.conf:!include_try /usr/local/share/dovecot/protocols.d/*.protocol /usr/local/etc/dovecot/dovecot.conf:#base_dir = /usr/local/var/run/dovecot/ /usr/local/etc/dovecot/conf.d/10-mail.conf:#mail_plugin_dir = /usr/local/lib/dovecot/modules /usr/local/etc/dovecot/conf.d/90-quota.conf:# executable = script /usr/local/bin/quota-warning.sh
So dovecot should use the default path /var/run if I understood you right. But it does not do so in my case. Is there any information which I could provide to help narrow down the
I tried with removing the base_dir definition from my config, restartet dovecot and checked with the commands you provided below: << root@nordkap:~# doveconf -d base_dir base_dir = /usr/local/var/run/dovecot root@nordkap:~# doveconf base_dir base_dir = /usr/local/var/run/dovecot root@nordkap:~# su vmail -s /bin/sh -c "doveconf base_dir" base_dir = /usr/local/var/run/dovecot problem? On the other side it's not really important as it works like charm with a symlink ;-)
Cheers
tobi
Probably your Dovecot binaries are built with a default base_dir of /var/run/dovecot. What do the following give you?
doveconf -d base_dir (as root) doveconf base_dir (as root) doveconf base_dir (as vmail:vmail)
Would it might be a "fix" to symlink /usr/local/var/run/dovecot to /var/run/dovecot ? Or would that break something with dovecot? It probably won't break anything, but why don't you just use /var/run/dovecot in the first place and take that base_dir definition out of dovecot.conf?
Ben
Hi Tobi,
take a look at the output from 'configure --help'. The problem is the imo stupid default of '--localstatedir'. ----%<---------------------------------------------------------- --localstatedir=DIR modifiable single-machine data [PREFIX/var] ----%<----------------------------------------------------------
Because you are obviously not specifying a prefix the default prefix '/usr/local' is used, thus your localstatedir is '/usr/local/var'.
When examining the output of 'configure --help' we will also find: ----%<---------------------------------------------------------- --with-rundir=DIR Runtime data directory (LOCALSTATEDIR/run/dovecot) ----%<----------------------------------------------------------
I guess now you see what your problem is.
AS you are compiling dovecot on your own (not using any prebuilt package) it is of course perfectly fine to use the default prefix (/usr/local), but you might want to simply specify '--localstatedir=/var' when running configure. Then there should be no need for you symlink ;)
Hope that helps.
Cheers, Chris
Am Tue, 07 May 2013 18:07:22 +0200 schrieb Tobi <tobster@brain-force.ch>:
hi Ben
for me it seems that all is build with /usr/local 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
I checked all the configs again for any path to /usr/local and found nothing (which is not commented out) that would affect basedir << root@nordkap:~# find /usr/local/etc/dovecot/ -type f -exec grep -H /usr/local/ {} \; /usr/local/etc/dovecot/README:/usr/local/share/doc/dovecot/example-config/ /usr/local/etc/dovecot/dovecot.conf:!include_try /usr/local/share/dovecot/protocols.d/*.protocol /usr/local/etc/dovecot/dovecot.conf:#base_dir = /usr/local/var/run/dovecot/ /usr/local/etc/dovecot/conf.d/10-mail.conf:#mail_plugin_dir = /usr/local/lib/dovecot/modules /usr/local/etc/dovecot/conf.d/90-quota.conf:# executable = script /usr/local/bin/quota-warning.sh
So dovecot should use the default path /var/run if I understood you right. But it does not do so in my case. Is there any information which I could provide to help narrow down
I tried with removing the base_dir definition from my config, restartet dovecot and checked with the commands you provided below: << root@nordkap:~# doveconf -d base_dir base_dir = /usr/local/var/run/dovecot root@nordkap:~# doveconf base_dir base_dir = /usr/local/var/run/dovecot root@nordkap:~# su vmail -s /bin/sh -c "doveconf base_dir" base_dir = /usr/local/var/run/dovecot directory May 7 17:47:57 nordkap dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information. the problem? On the other side it's not really important as it works like charm with a symlink ;-)
Cheers
tobi
Probably your Dovecot binaries are built with a default base_dir of /var/run/dovecot. What do the following give you?
doveconf -d base_dir (as root) doveconf base_dir (as root) doveconf base_dir (as vmail:vmail)
Would it might be a "fix" to symlink /usr/local/var/run/dovecot to /var/run/dovecot ? Or would that break something with dovecot? It probably won't break anything, but why don't you just use /var/run/dovecot in the first place and take that base_dir definition out of dovecot.conf?
Ben
-- Kind regards, Mit freundlichen Grüßen, Christian Wiese
Follow us on Facebook: <http://www.facebook.com/pages/Securepoint-GmbH/132451210137395>
Follow us on Twitter: <http://twitter.com/SecurepointStat>
Securepoint GmbH Christian Wiese Salzstr. 1 D-21335 Lueneburg http://www.securepoint.de Tele: ++49 4131 2401-0 Fax: ++49 4131 2401-50 Lueneburg HRB 1776
CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
GEHEIMHALTUNGSPFLICHT : Dieses E-Mail und alle damit verbundenen Anlagen sind vertraulich und dürfen nur bestimmten Personen zugänglich gemacht werden. Sofern Sie nicht zu den angegebenen Empfängern gehören, benachrichtigen Sie bitte unverzüglich den Absender. Der Inhalt darf weder an Dritte weitergegeben noch zu anderen Zwecken verwendet werden. Die Informationen dürfen auch nicht auf einem Datenträger gespeichert oder auf einen Datenträger kopiert werden.
Hi Tobi,
my problem is not why /usr/local is used I choose this prefix intentionally so that I have the new dovecot separeted from the "old" one from debian backports.
As I tried to say in my mailing list post '/usr/local' is the right choice to avoid conflicts with binary packages provided by your favorite distribution.
My problem is more: why does the lda search in /var/run when all the rest of dovecot correctly uses /usr/local/var/run The problem is only the lda part. All other stuff from dovecot looks in the correct location (login, plugins etc)
I wait until debian has 2.2 dovecot in repo and then this symlink is not needed anymore ;-)
It seems you didn't read my mail carefully ;) You do not have to wait for debian providing a dovecot 2.2 binary package.
To solve your "symlink issue" right now, you do not even have to uninstall your current 2.2 installation, because you simply need to reconfigure your source tree using exactly the same configure options like before, only adding '--localstatedir=/var'.
So if you used something like './configure --prefix=/usr/local' you simply need to run: ------%<----------------------------------------------------------- ./configure --prefix=/usr/local --localstatedir=/var' ------%<-----------------------------------------------------------
Of course you also need to run 'make' and before running 'make install' you should remove your current '/var/run/dovecot' symlink.
After restarting your dovecot service everything should be fine without the need to create that symlink.
That's all what needs to be done.
Cheers, Chris
Am Tue, 7 May 2013 18:24:07 +0200 schrieb Christian Wiese <christian.wiese@securepoint.de>:
Hi Tobi,
take a look at the output from 'configure --help'. The problem is the imo stupid default of '--localstatedir'. ----%<---------------------------------------------------------- --localstatedir=DIR modifiable single-machine data [PREFIX/var] ----%<----------------------------------------------------------
Because you are obviously not specifying a prefix the default prefix '/usr/local' is used, thus your localstatedir is '/usr/local/var'.
When examining the output of 'configure --help' we will also find: ----%<---------------------------------------------------------- --with-rundir=DIR Runtime data directory (LOCALSTATEDIR/run/dovecot) ----%<----------------------------------------------------------
I guess now you see what your problem is.
AS you are compiling dovecot on your own (not using any prebuilt package) it is of course perfectly fine to use the default prefix (/usr/local), but you might want to simply specify '--localstatedir=/var' when running configure. Then there should be no need for you symlink ;)
Hope that helps.
Cheers, Chris
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@nordkap:~# doveconf -d base_dir base_dir = /usr/local/var/run/dovecot root@nordkap:~# doveconf base_dir base_dir = /usr/local/var/run/dovecot root@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.
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?
Ben
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@nordkap:~# doveconf -d base_dir base_dir = /usr/local/var/run/dovecot root@nordkap:~# doveconf base_dir base_dir = /usr/local/var/run/dovecot root@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 ;-) 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
Am 08.05.2013 19:21, schrieb Ben Morrow: the lda looking in /var/run occured again.
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 :-)
tobi
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@nordkap:~# doveconf -d base_dir base_dir = /usr/local/var/run/dovecot root@nordkap:~# doveconf base_dir base_dir = /usr/local/var/run/dovecot root@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...
but as well with those after starting dovecot and postfix the errors of
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 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
Am 09.05.2013 02:30, schrieb Ben Morrow:
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@nordkap:~# doveconf -d base_dir base_dir = /usr/local/var/run/dovecot root@nordkap:~# doveconf base_dir base_dir = /usr/local/var/run/dovecot root@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
At 9PM +0200 on 8/05/13 you (Tobi) wrote: 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...
but as well with those after starting dovecot and postfix the errors of
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 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
As I actually built with localstatedir=/var all the paths are correct << ldd /usr/local/libexec/dovecot/deliver ...
this localstatedir option was just a "test" to see if lda looks in the localstatedir specified with configure. At least in my case it is not. After that test I built again with localstatedir=/var (as suggested by Christian) and like that it works fine without the symlink libdovecot.so.0 => /usr/local/lib/dovecot/libdovecot.so.0 (0x00007fc41bcd9000) ...
and << root@nordkap:~# strings /usr/local/lib/dovecot/libdovecot.so.0 | grep /var /var/lib/dovecot/instances /var/run/dovecot/config /var/run/dovecot /var/lib/dovecot /var/run /var/tmp
I will built dovecot again with localstatedir=/usr/local/var and re-check the paths with the commands above.
Thanks for all the help here, really a great list
tobi
participants (5)
-
Ben Morrow
-
Christian Wiese
-
Noel Butler
-
Robert Schetterer
-
Tobi