Description of problem: After upgrading the exim and exim‑pgsql packages from EPEL on Rocky Linux 9.6 all PostgreSQL lookups fail with: ``` failed to expand "pgsql;SELECT name FROM domains WHERE name = '${quote_pgsql:$domain}'" while checking a list: unknown lookup type "pgsql" ``` Version-Release number of selected component (if applicable): exim-4.99-1.el9.aarch64 exim-pgsql-4.99-1.el9.aarch64 How reproducible: 1. Create a PostgreSQL database that contains a table `domains` with at least a `name` column. 2. Configure Exim as follows: ``` pgsql_servers = ... domainlist virtual_domains = pgsql;SELECT name FROM domains WHERE name = '${quote_pgsql:$domain}' domainlist local_domains = +primary_domains : +virtual_domains ``` 3. Restart Exim. 4. Send a message addressed to a domain that exists in the `domains` table. Actual results: Delivery fails and the Exim log contains the "unknown lookup type pgsql" error. Expected results: Exim should load the `pgsql` lookup module, execute the SQL query, obtain the domain name from the database, and process the message normally. Additional info: Rebuilding the exim package with static linking against `libpq` removes the error, which suggests that the dynamic linkage to the shared library provided by exim-pgsql is not working properly.
Running exim -bt -d under strace reveals that exim is attempting to load /usr/lib64/exim/4.99-1.fc43/lookups/pgsql_lookup.so, but exim-pgsql provides /usr/lib64/exim/4.99-1.fc43/lookups/pgsql.so. As a workaround, making a second copy of the shareable library with the name exim is trying to use restores the functionality: cp -p /usr/lib64/exim/4.99-1.fc43/lookups/pgsql.so /usr/lib64/exim/4.99-1.fc43/lookups/pgsql_lookup.so
See bug #2415008; it's the same issue
*** This bug has been marked as a duplicate of bug 2415008 ***