Defining default value for sa_username_maps

Ain amavis at luftivennad.com
Tue Apr 25 16:12:56 CEST 2023


Hello!

I have many users with different domains, so I have my users in MariaDB
database (accordingly to
https://svn.apache.org/repos/asf/spamassassin/trunk/sql/README.bayes) and
my sa_username_maps is defined as follows:

@sa_username_maps = new_RE (
  [ qr'^([^@]+ at .*)'i => '${1}' ]
);

That seems work pretty fine, except when user don't exists in bayes_vars
table. Amavis still tries use nonexisting user, spamassassin seems simply
ignore bayes tests in that case.
I like amavis or spamassassin fallback to default user, like when
sa_username_maps don't have relevant match.
I tried define "bayes_sql_override_username" in local.cf, but this of
course overwrites user, even when match is found in bayes_vars.

What are my options?

Any clarifying questions welcome, my brain is pretty foggy after 6 hours
of debuging and testing :(








More information about the amavis-users mailing list