Re: Feature request: more flexible database lookups

From: John Massai <>
Date: Sat, 19 Sep 2015 13:50:45 -0700

>> 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?

The OP of the referenced thread has an "ALL" entry in his database
which doesn't have a key associated. He wanted to skip that row. My
case, some domains are not using DKIM and they do not have key data. I
solved by creating a view with the WHERE clause I need, but that
shouldn't be necessary. IMO, you never know what other needs will
arise, so by providing more flexibility you already support those
needs without people asking for help.

>> 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.
> from
> db.c
> line 4467:
> snprintf(query, sizeof query,
> "SELECT %s FROM %s WHERE %s = '%s'%s%s",
> dsn->dsn_datacol,
> dsn->dsn_table,
> 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)

But for some reason, the filter variable isn't working on SigningTable
as mentioned by myself (EPEL) and him (Debian). I don't know if that
bug is fixed yet or not, but seems to have been around for a long

Regardless, I am not trying to solve anything, I am asking for a bug
fix (above) at least and a feature enhancement (more direct query
control) would be better.
Received on Sat Sep 19 2015 - 20:50:59 PST

This archive was generated by hypermail 2.3.0 : Sat Sep 19 2015 - 20:54:00 PST