I just spend an hour trying out different versions of my /etc/pam.d/* files. I also tried it with the ones Lithorus posted. Unfortunately I still get the segfaults.
As Cafuego suggested, I did a stacktrace (using strace) of trivial-rewrite, which is one of the processes that's segfaulting. It was the first time I used strace, so I'm absolutely no exert. Still I think the following lines are relevant.
Code:
Sep 2 21:46:54 server1 logger: open("/opt/zimbra/lib/libldap_r-2.4.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
Sep 2 21:46:54 server1 logger: open("/opt/zimbra/mysql-standard-5.0.51a-pc-linux-gnu-i686-glibc23/lib/libldap_r-2.4.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
Sep 2 21:46:54 server1 logger: open("/opt/zimbra/mysql-standard-5.0.51a-pc-linux-gnu-i686-glibc23/lib/mysql/libldap_r-2.4.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
Sep 2 21:46:54 server1 logger: open("/opt/zimbra/openldap-clibs-2.3.42.8z/lib/libldap_r-2.4.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
Sep 2 21:46:54 server1 logger: open("/opt/zimbra/openssl-0.9.8g/lib/libldap_r-2.4.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
Sep 2 21:46:54 server1 logger: open("/opt/zimbra/cyrus-sasl-2.1.22.3z/lib/libldap_r-2.4.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
Sep 2 21:46:54 server1 logger: open("/opt/zimbra/sleepycat-4.2.52.6/lib/libldap_r-2.4.so.2", O_RDONLY) = -1 ENOENT (No such file or directory) The code above means to me that this process is trying to load the library "libldap_r-2.4.so.2". Therefor it is looking in various Zimbra directories. However it can't be found there.
The trace continues like that:
Code:
Sep 2 21:46:54 server1 logger: access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
Sep 2 21:46:54 server1 logger: open("/usr/lib/libldap_r-2.4.so.2", O_RDONLY) = 10 So now, after not finding the library inside the Zimbra directories, the process uses the values from "/etc/ld.so.cache" and figures out that the library is available in the system directory "/usr/lib". Then this library is loaded.
The problem is that my system libraries have different version than the Zimbra libraries. For example, Zimbra contains libldap-2.3.so.0 whereas Ubuntu contains libldap_r-2.4.so.2.
If I check Zimbras postfix I see that it is linked against libldap-2.3.so.0 which is located in "/opt/zimbra/lib". Therefore this version of libldap should be used and not version 2.4.
Code:
root@server1:~# ldconfig -v | grep libldap
libldap_r-2.4.so.2 -> libldap_r-2.4.so.2.0.5
Code:
root@server1:~# ldd /opt/zimbra/postfix/libexec/trivial-rewrite | grep libldap
libldap-2.3.so.0 => /opt/zimbra/lib/libldap-2.3.so.0 (0xb7dd6000)
As I read the rest of the stacktrace I can see that the same behavior for many other libs. The process is looking for the following libs inside the Zimbra directories. But as it cannot find them they are loaded from the system directories.
- libldap_r-2.4.so.2
- liblber-2.4.so.2
- libkrb5.so.3
- libcom_err.so.2
- libgssapi_krb5.so.2
- libgnutls.so.13
- libk5crypto.so.3
- libkrb5support.so.0
- libkeyutils.so.1
- libtasn1.so.3
- libgcrypt.so.11
- libgpg-error.so.0
So my conclusion would be, that for some reason postfix gets confused about which version of the libraries should be loaded. It tries to load the newer libraries, which it does not provide. Instead it should stick to it's own (older) libraries, which are provided by Zimbra.
Maybe I'm on the complete wrong track here, as I said, I'm not experienced with this kind of problems. So if you think that's BS, please let me know. On the other side there must be a reason for a segfault and simply a wrong config file shouldn't be the problem.
Maybe the problem is, that I just recently moved the installation from Debian to Ubuntu (this was before my Samba experiments started) and maybe the loading of dynamically linked libraries are somehow different between those distributions.... Maybe some LD_PRELOAD magic could help?!
However, any help is still greatly appreciated.
Cheers!
Conny