On 04.07.2016 02:42, Andreas M. Kirchwitz wrote: > Dear Dovecot developers! > > This problem already existed some years ago, has been fixed, > and now it's there again in Dovecot 2.2.25 (2.2.24 was fine). > > I'm running CentOS 6 with a custom OpenSSL installation in /usr/local/ssl > Therefore, Dovecot is configured like this: > > env SSL_CFLAGS="-I/usr/local/ssl/include" SSL_LIBS="-L/usr/local/ssl/lib > -Wl,-R/usr/local/ssl/lib -lcrypto -lssl" ./configure > --prefix=/usr/local/Dovecot-2.2.25 --with-ssl=openssl > --with-ssldir=/usr/local/Dovecot-2.2.25/etc/dovecot/certs > > With "pkg-config", the same options for SSL are provided. > > "make" and "make install" run just fine, and the daemon starts > without any errors. However, if a user connects on port 993 (IMAPS), > Dovecot logs this failure message to syslog: > > Jul 4 01:08:43 myhost dovecot: ssl-params: Fatal: Couldn't load required > plugin /usr/local/Dovecot-2.2.25/lib/dovecot/libssl_iostream_openssl.so: > dlopen() failed: libcrypto.so.1.0.0: cannot open shared object file: No such > file or directory > Jul 4 01:08:43 myhost dovecot: ssl-params: Error: child process failed with > status 22784 > > ldd /usr/local/Dovecot-2.2.25/lib/dovecot/libssl_iostream_openssl.so > linux-gate.so.1 => (0x00e8c000) > libcrypto.so.1.0.0 => not found > libssl.so.1.0.0 => not found > librt.so.1 => /lib/librt.so.1 (0x00be4000) > libc.so.6 => /lib/libc.so.6 (0x001a6000) > libpthread.so.0 => /lib/libpthread.so.0 (0x003e4000) > /lib/ld-linux.so.2 (0x007e7000) > > ldd /usr/local/Dovecot-2.2.25/lib/dovecot/libdcrypt_openssl.so > linux-gate.so.1 => (0x00dca000) > libcrypto.so.1.0.0 => not found > libssl.so.1.0.0 => not found > librt.so.1 => /lib/librt.so.1 (0x00a7a000) > libc.so.6 => /lib/libc.so.6 (0x00160000) > libpthread.so.0 => /lib/libpthread.so.0 (0x0072f000) > /lib/ld-linux.so.2 (0x00560000) > > When comparing to Dovecot 2.2.24: > > ldd /usr/local/Dovecot-2.2.24/lib/dovecot/libssl_iostream_openssl.so > linux-gate.so.1 => (0x0073d000) > libcrypto.so.1.0.0 => /usr/local/ssl/lib/libcrypto.so.1.0.0 > (0x00b04000) > libssl.so.1.0.0 => /usr/local/ssl/lib/libssl.so.1.0.0 (0x0044a000) > librt.so.1 => /lib/librt.so.1 (0x00a60000) > libc.so.6 => /lib/libc.so.6 (0x001e5000) > libdl.so.2 => /lib/libdl.so.2 (0x003a9000) > libpthread.so.0 => /lib/libpthread.so.0 (0x009d0000) > /lib/ld-linu222222x.so.2 (0x00d77000) > > There's no libdcrypt_openssl.so in Dovecot 2.2.24, so I guess > with the newly introduced dcrypt stuff something with SSL went wrong. > > Would be great if that could be fixed so that SSL works again. > > Thanks a lot in advance ... Andreas
Hi! Can you try the attached patch out? --- Aki Tuomi Dovecot oy
From e20fab54f9ff0aa220a8147d82497606eeee788f Mon Sep 17 00:00:00 2001 From: Aki Tuomi <[email protected]> Date: Mon, 8 Aug 2016 15:31:50 +0300 Subject: [PATCH] OpenSSL: link against OpenSSL libs explicitly --- src/lib-dcrypt/Makefile.am | 1 + src/lib-ssl-iostream/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib-dcrypt/Makefile.am b/src/lib-dcrypt/Makefile.am index 62c4625..fefb3ed 100644 --- a/src/lib-dcrypt/Makefile.am +++ b/src/lib-dcrypt/Makefile.am @@ -18,6 +18,7 @@ if BUILD_OPENSSL pkglib_LTLIBRARIES += libdcrypt_openssl.la libdcrypt_openssl_la_SOURCES = dcrypt-openssl.c dcrypt.c libdcrypt_openssl_la_LDFLAGS = -module -avoid-version -shared ../lib-ssl-iostream/libdovecot_openssl_common.la ../lib/liblib.la +libdcrypt_openssl_la_LIBADD = $(SSL_LIBS) libdcrypt_openssl_la_DEPENDENCIES = ../lib-ssl-iostream/libdovecot_openssl_common.la ../lib/liblib.la libdcrypt_openssl_la_CFLAGS = $(AM_CPPFLAGS) \ -DDCRYPT_MODULE_DIR=\"$(pkglibdir)\" diff --git a/src/lib-ssl-iostream/Makefile.am b/src/lib-ssl-iostream/Makefile.am index 769de87..86555d5 100644 --- a/src/lib-ssl-iostream/Makefile.am +++ b/src/lib-ssl-iostream/Makefile.am @@ -16,7 +16,7 @@ libdovecot_openssl_common_la_SOURCES = \ dovecot-openssl-common.c libssl_iostream_openssl_la_LDFLAGS = -module -avoid-version -libssl_iostream_openssl_la_LIBADD = libdovecot_openssl_common.la +libssl_iostream_openssl_la_LIBADD = libdovecot_openssl_common.la $(SSL_LIBS) libssl_iostream_openssl_la_SOURCES = \ iostream-openssl.c \ iostream-openssl-common.c \ -- 2.1.4
