Bartosz Rudnicki
2016-11-26 13:10:02 UTC
Package: postfix
Version: 3.1.3-2
Severity: normal
It seems that the Postfix cleanup component has a problem with handling additional lookup types (pcre in my case). After installation "postfix-pcre" package which was required to use pcre maps, my dynamicmaps.cf has been filled by entry "pcre postfix-pcre.so.1.0.1 dict_pcre_open" that looks properly, because in /usr/lib/postfix directory appeared new file which is called the same way.
Unfortunately after the addition of new option in the main.cf file "milter_header_checks = pcre:/path/to/pcre/table" and reload postfix daemon everything seems good, until new message arrive and cleanup try to read my pcre file. The following log is generated:
--
Nov 26 12:59:57 Sirius postfix/cleanup[18352]: warning: unsupported dictionary type: pcre (/usr/lib/postfix/postfix-pcre.so.1.0.1: No such file or directory)
Nov 26 12:59:57 Sirius postfix/cleanup[18352]: error: unsupported dictionary type: pcre
--
It looks like for some reason the cleanup process can not reach new library file. Obviously the postfix-pcre.so.1.0.1 really exists in /usr/lib/postfix direcotry. I was suprised because I use also mysql lookups for virtual-domains functionality, which needs aditional library too (of course postfix-mysql library file exists in /usr/lib/postfix directory and has appropriate entry in dynamicmaps.cf) but it works properly. I figured out that major diffrence between cleanup and virtual (virtual-domains) is that the cleanup works chrooted into /var/spool/postfix directory, while the virtual not. Therefore I thouht that for some reason cleanup mistakenly looking for library into chrooted direcory, so I copied whole /usr/lib/postfix/ directory into /var/spool/postfix/usr/lib/ and manually reloaded postfix.
To my surprise logs looked different:
--
Nov 26 11:22:06 Sirius postfix/cleanup[17836]: fatal: load_library_symbols: dlopen failure loading /usr/lib/postfix/postfix-pcre.so.1.0.1: libpcre.so.3: cannot open shared object file: No such file or directory
Nov 26 11:22:07 Sirius postfix/master[17826]: warning: process /usr/lib/postfix/sbin/cleanup pid 17836 exit status 1
Nov 26 11:22:07 Sirius postfix/master[17826]: warning: /usr/lib/postfix/sbin/cleanup: bad command startup -- throttling
--
Now it looks that cleanup read properly lib file but has other troubles with handling the library itself. On this stage I am not able to manage with this bug, please take a look at this strange behavior.
-- /etc/postfix/dynamicmaps.cf --
# dict-type so-name (pathname) dict-function mkmap-function
mysql postfix-mysql.so.1.0.1 dict_mysql_open
sqlite postfix-sqlite.so.1.0.1 dict_sqlite_open
pcre postfix-pcre.so.1.0.1 dict_pcre_open
-- /usr/lib/postfix/ contents --
-rwxr-xr-x 1 root root 4347 paź 30 12:56 configure-instance.sh
lrwxrwxrwx 1 root root 23 paź 30 12:56 libpostfix-dns.so.1 -> libpostfix-dns.so.1.0.1
-rw-r--r-- 1 root root 27088 paź 30 12:56 libpostfix-dns.so.1.0.1
lrwxrwxrwx 1 root root 26 paź 30 12:56 libpostfix-global.so.1 -> libpostfix-global.so.1.0.1
-rw-r--r-- 1 root root 277152 paź 30 12:56 libpostfix-global.so.1.0.1
lrwxrwxrwx 1 root root 26 paź 30 12:56 libpostfix-master.so.1 -> libpostfix-master.so.1.0.1
-rw-r--r-- 1 root root 39576 paź 30 12:56 libpostfix-master.so.1.0.1
lrwxrwxrwx 1 root root 23 paź 30 12:56 libpostfix-tls.so.1 -> libpostfix-tls.so.1.0.1
-rw-r--r-- 1 root root 103472 paź 30 12:56 libpostfix-tls.so.1.0.1
lrwxrwxrwx 1 root root 24 paź 30 12:56 libpostfix-util.so.1 -> libpostfix-util.so.1.0.1
-rw-r--r-- 1 root root 260504 paź 30 12:56 libpostfix-util.so.1.0.1
-rwxr-xr-x 1 root root 13052 paź 30 12:56 postfix_groups.pl
-rw-r--r-- 1 root root 18864 paź 30 12:56 postfix-mysql.so.1.0.1
-rw-r--r-- 1 root root 18680 paź 30 12:56 postfix-pcre.so.1.0.1
-rw-r--r-- 1 root root 14624 paź 30 12:56 postfix-sqlite.so.1.0.1
drwxr-xr-x 2 root root 4096 lis 7 21:19 sbin
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages postfix depends on:
ii adduser 3.115
ii cpio 2.11+dfsg-5
ii debconf [debconf-2.0] 1.5.59
ii dpkg 1.18.10
ii init-system-helpers 1.45
ii libc6 2.24-3
ii libdb5.3 5.3.28-12
ii libicu57 57.1-4
ii libsasl2-2 2.1.26.dfsg1-15
ii libsqlite3-0 3.14.2-1+b1
ii libssl1.0.2 1.0.2j-1
ii lsb-base 9.20160629
ii netbase 5.3
ii ssl-cert 1.0.38
Versions of packages postfix recommends:
ii python3 3.5.1-4
Versions of packages postfix suggests:
ii bsd-mailx [mail-reader] 8.1.2-0.20160123cvs-3
ii dovecot-core [dovecot-common] 1:2.2.25-1
ii libsasl2-modules 2.1.26.dfsg1-15
ii mutt [mail-reader] 1.7.0-6
pn postfix-cdb <none>
pn postfix-doc <none>
pn postfix-ldap <none>
ii postfix-mysql 3.1.3-2
ii postfix-pcre 3.1.3-2
pn postfix-pgsql <none>
ii procmail 3.22-25
pn resolvconf <none>
pn sasl2-bin <none>
pn ufw <none>
-- debconf information excluded
Version: 3.1.3-2
Severity: normal
It seems that the Postfix cleanup component has a problem with handling additional lookup types (pcre in my case). After installation "postfix-pcre" package which was required to use pcre maps, my dynamicmaps.cf has been filled by entry "pcre postfix-pcre.so.1.0.1 dict_pcre_open" that looks properly, because in /usr/lib/postfix directory appeared new file which is called the same way.
Unfortunately after the addition of new option in the main.cf file "milter_header_checks = pcre:/path/to/pcre/table" and reload postfix daemon everything seems good, until new message arrive and cleanup try to read my pcre file. The following log is generated:
--
Nov 26 12:59:57 Sirius postfix/cleanup[18352]: warning: unsupported dictionary type: pcre (/usr/lib/postfix/postfix-pcre.so.1.0.1: No such file or directory)
Nov 26 12:59:57 Sirius postfix/cleanup[18352]: error: unsupported dictionary type: pcre
--
It looks like for some reason the cleanup process can not reach new library file. Obviously the postfix-pcre.so.1.0.1 really exists in /usr/lib/postfix direcotry. I was suprised because I use also mysql lookups for virtual-domains functionality, which needs aditional library too (of course postfix-mysql library file exists in /usr/lib/postfix directory and has appropriate entry in dynamicmaps.cf) but it works properly. I figured out that major diffrence between cleanup and virtual (virtual-domains) is that the cleanup works chrooted into /var/spool/postfix directory, while the virtual not. Therefore I thouht that for some reason cleanup mistakenly looking for library into chrooted direcory, so I copied whole /usr/lib/postfix/ directory into /var/spool/postfix/usr/lib/ and manually reloaded postfix.
To my surprise logs looked different:
--
Nov 26 11:22:06 Sirius postfix/cleanup[17836]: fatal: load_library_symbols: dlopen failure loading /usr/lib/postfix/postfix-pcre.so.1.0.1: libpcre.so.3: cannot open shared object file: No such file or directory
Nov 26 11:22:07 Sirius postfix/master[17826]: warning: process /usr/lib/postfix/sbin/cleanup pid 17836 exit status 1
Nov 26 11:22:07 Sirius postfix/master[17826]: warning: /usr/lib/postfix/sbin/cleanup: bad command startup -- throttling
--
Now it looks that cleanup read properly lib file but has other troubles with handling the library itself. On this stage I am not able to manage with this bug, please take a look at this strange behavior.
-- /etc/postfix/dynamicmaps.cf --
# dict-type so-name (pathname) dict-function mkmap-function
mysql postfix-mysql.so.1.0.1 dict_mysql_open
sqlite postfix-sqlite.so.1.0.1 dict_sqlite_open
pcre postfix-pcre.so.1.0.1 dict_pcre_open
-- /usr/lib/postfix/ contents --
-rwxr-xr-x 1 root root 4347 paź 30 12:56 configure-instance.sh
lrwxrwxrwx 1 root root 23 paź 30 12:56 libpostfix-dns.so.1 -> libpostfix-dns.so.1.0.1
-rw-r--r-- 1 root root 27088 paź 30 12:56 libpostfix-dns.so.1.0.1
lrwxrwxrwx 1 root root 26 paź 30 12:56 libpostfix-global.so.1 -> libpostfix-global.so.1.0.1
-rw-r--r-- 1 root root 277152 paź 30 12:56 libpostfix-global.so.1.0.1
lrwxrwxrwx 1 root root 26 paź 30 12:56 libpostfix-master.so.1 -> libpostfix-master.so.1.0.1
-rw-r--r-- 1 root root 39576 paź 30 12:56 libpostfix-master.so.1.0.1
lrwxrwxrwx 1 root root 23 paź 30 12:56 libpostfix-tls.so.1 -> libpostfix-tls.so.1.0.1
-rw-r--r-- 1 root root 103472 paź 30 12:56 libpostfix-tls.so.1.0.1
lrwxrwxrwx 1 root root 24 paź 30 12:56 libpostfix-util.so.1 -> libpostfix-util.so.1.0.1
-rw-r--r-- 1 root root 260504 paź 30 12:56 libpostfix-util.so.1.0.1
-rwxr-xr-x 1 root root 13052 paź 30 12:56 postfix_groups.pl
-rw-r--r-- 1 root root 18864 paź 30 12:56 postfix-mysql.so.1.0.1
-rw-r--r-- 1 root root 18680 paź 30 12:56 postfix-pcre.so.1.0.1
-rw-r--r-- 1 root root 14624 paź 30 12:56 postfix-sqlite.so.1.0.1
drwxr-xr-x 2 root root 4096 lis 7 21:19 sbin
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages postfix depends on:
ii adduser 3.115
ii cpio 2.11+dfsg-5
ii debconf [debconf-2.0] 1.5.59
ii dpkg 1.18.10
ii init-system-helpers 1.45
ii libc6 2.24-3
ii libdb5.3 5.3.28-12
ii libicu57 57.1-4
ii libsasl2-2 2.1.26.dfsg1-15
ii libsqlite3-0 3.14.2-1+b1
ii libssl1.0.2 1.0.2j-1
ii lsb-base 9.20160629
ii netbase 5.3
ii ssl-cert 1.0.38
Versions of packages postfix recommends:
ii python3 3.5.1-4
Versions of packages postfix suggests:
ii bsd-mailx [mail-reader] 8.1.2-0.20160123cvs-3
ii dovecot-core [dovecot-common] 1:2.2.25-1
ii libsasl2-modules 2.1.26.dfsg1-15
ii mutt [mail-reader] 1.7.0-6
pn postfix-cdb <none>
pn postfix-doc <none>
pn postfix-ldap <none>
ii postfix-mysql 3.1.3-2
ii postfix-pcre 3.1.3-2
pn postfix-pgsql <none>
ii procmail 3.22-25
pn resolvconf <none>
pn sasl2-bin <none>
pn ufw <none>
-- debconf information excluded