Re: Feature request: more flexible database lookups

From: Daniel Black <>
Date: Sat, 19 Sep 2015 12:27:30 +1000

Hash: SHA256

On 19/09/15 10:58, John Massai wrote:
> When first learning to configure opendkim with a database, the DSN
> syntax seemed a little underwhelming and insufficient for a complex
> system.

What is your requirement? What are you trying to achieve?

> I did a lot of digging and found this old thread that
> references a feature not even mentioned in any of the documentation:
> "?filter"

quite right.


line 4467:
    snprintf(query, sizeof query,
             "SELECT %s FROM %s WHERE %s = '%s'%s%s",
             dsn->dsn_keycol, escaped,
             dsn->dsn_filter == NULL ? "" : " AND ",
             dsn->dsn_filter == NULL ? "" : dsn->dsn_filter);

So it seems to can be added as an expression. It does have special
handling where =xx where x is a hex digit is translated into a
character. (line 2690)

There is also a lua interface for handling complex key handling.

> Yet in newer versions of opendkim even that feature is broken on
> SigningTable which is where it is most useful.
> So we are left with hacked up work-arounds. I'd love to see at least
> "?filter" working again on SigningTable (and corresponding
> documentation added) -- better yet, a more robust/flexible way to
> build the WHERE clause if not the entire query.
> Thanks for opendkim.
Received on Sat Sep 19 2015 - 02:27:58 PST

This archive was generated by hypermail 2.3.0 : Sat Sep 19 2015 - 02:36:01 PST