I had usages checked.
There are three:
src/global/nbdb_surrogate_test.c and src/global/nbdb_redirect_test.c
if ((dict->flags & DICT_FLAG_SURROGATE) == 0)

which never executes.

and the tricky one:
src/util/dict_surrogate.c
dp->dict.flags = dict_flags | DICT_FLAG_PATTERN | DICT_FLAG_SURROGATE;

which sets DICT_FLAG_DUP_WARN instead.
Which is not used if the dict_surrogate is called.

So that's why it was never pointed out untill 20260709

Best Regards, Pourya Adeli


On Wed, Sep 16, 2026, 4:46 PM Viktor Dukhovni via Postfix-users <
[email protected]> wrote:

> On Wed, Sep 16, 2026 at 09:04:34AM -0400, Wietse Venema via Postfix-users
> wrote:
>
> > > I have noticed something which is fixed on experimental 3.12 releases,
> but
> > > I couldn't find the reason why this is not included in the latest
> 3.11.7
> > > release.
> > >
> > > In util/dict.h, dictionary flags are defined and the only one not using
> > > bitwise left shift is DICT_FLAG_SURROGATE, so every conditional
> statement
> > > checking this is always true.
> > >
> > > I was just interested to know why this is not included in stable
> releases.
> >
> > It was found by an AI and it was never reported as a problem.
>
> The 3.11 version seems to have a typo:
>
>     postfix-3.11:src/util/dict.h:#define DICT_FLAG_SURROGATE      (1<22)
> /* This is a surrogate dictionary */
>           master:src/util/dict.h:#define DICT_FLAG_SURROGATE      (1<<22)
> /* This is a surrogate dictionary */
>
> --
>     Viktor.  🇺🇦 Слава Україні!
> _______________________________________________
> Postfix-users mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to