Unfortunately I cannot reopen the NFR to continue the discussion there but I think there is a better way (respecting your wishes) as well as sticking more closely to the rspamd design w/r to configuration overrides.
Since I cannot post to the feature request I will post it here:
This is a deliberate trade-off between preserving the upstream configuration structure and the Mail module’s container-based architecture, while still providing a supported and persistent customization path through override.d/.
What upstream configuration? AFAICT, based on mail-rspamd versions · nethserver · GitHub you are using plan alpine container and have etc/local.d under your control in ns8-mail. That could as well be mapped as modules.d instead or am I wrong here?
Another way to keep as close to the rspamd design philosophy (and allow for local.d volume) could be the following I think:
Take for instance your current etc/modules.d/antivirus.conf, originally (w/o comments) it is:
$ podman exec -it rspamd grep -Ev '^[[:space:]]*#' /etc/rspamd/modules.d/antivirus.conf
antivirus {
.include(try=true,priority=5) "${DBDIR}/dynamic/antivirus.conf"
.include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/antivirus.conf"
.include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/antivirus.conf"
}
I think this could (easily) be extended by adding defaults from another folder (e. g. etc/rspamd/nethserver.d for instance) and merge them with a lower priority so users can override them using /etc/rspamd/local.d/ when you make /etc/rspamd/modules.d/antivirus.conf contain this:
antivirus {
.include(try=true,priority=5) "${DBDIR}/dynamic/antivirus.conf"
.include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/nethserver.d/antivirus.conf"
.include(try=true,priority=2,duplicate=merge) "$LOCAL_CONFDIR/local.d/antivirus.conf"
.include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/antivirus.conf"
}
Note the changes for priority here for local.d w/r to the default one (slight increase) and the addition of the nethserver.d specifics with a lower priority w/r to the local.d one so changes in local.d win from default suggestions from your side.
If I am not mistaken this should merge the values you want to suggest from nethserver with the defaults as you do now and still make it possible to mount local.d as a volume and specify overridden values by the administrator of the system.
I am hoping you can/will accept this and reopen the feature request to implement this as I think it is a win/win as explained above.