linux-system-roles / postfix

An ansible role which configures postfix
https://linux-system-roles.github.io/postfix/
GNU General Public License v3.0
14 stars 20 forks source link

Please add fact providing the default built-in database type #163

Open yarda opened 2 days ago

yarda commented 2 days ago

On RHEL < 10 the default built-in database is "hash" which is what postfix upstream intended. On RHEL>=10 the default built-in database changed to "lmdb" (diversion from upstream), because the bdb library providing the "hash" was dropped. This can be issue on some other distro's not only on RHEL, because bdb is quite problematic library.

So this can affects playbooks using this role which can run across different RHEL versions. For example on < RHEL-10 you need to have:

relay_domains="hash:/etc/postfix/relay_domains"

But on >= RHEL-10 you need to have:

relay_domains="lmdb:/etc/postfix/relay_domains"

It would be great if you could write it as:

relay_domains="$DEFAULT_MAP:/etc/postfix/relay_domains"

or similarly.

yarda commented 2 days ago

Detection:

RHEL-9:

$ postconf default_database_type
default_database_type = hash

RHEL-10:

$ postconf default_database_type
default_database_type = lmdb