Bug 2415247 - exim-4.99 no longer recognises the `pgsql` lookup type
Summary: exim-4.99 no longer recognises the `pgsql` lookup type
Keywords:
Status: CLOSED DUPLICATE of bug 2415008
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: exim
Version: epel9
Hardware: aarch64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-11-16 09:43 UTC by akborder
Modified: 2025-12-10 09:34 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-12-10 09:34:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description akborder 2025-11-16 09:43:54 UTC
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.

Comment 1 Chris Palmer 2025-11-18 09:03:11 UTC
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

Comment 2 Tim Jackson 2025-11-18 10:23:31 UTC
See bug #2415008; it's the same issue

Comment 3 Jaroslav Škarvada 2025-12-10 09:34:04 UTC

*** This bug has been marked as a duplicate of bug 2415008 ***


Note You need to log in before you can comment on or make changes to this bug.