I' running email server with rspamd as spam filter. I have 2 bayes classifiers, one with original config named global and second with per_user = true named per_user. The per_user classifier has same config as global with only difference - symbols are renamed to BAYES_HAM_USER and BAYES_SPAM_USER. So now when user received email, in header there are added 2 symbols from both classifiers (for example BAYES_HAM from global classifier and BAYES_HAM_USER from per_user classifier).
I need to run only one classifier for user, global or per_user and this choice is up to each user (per_user classifier for few users and global classifier for others). How can I do that?
I have one idea, but it seems overkill for me. My idea is to create webpage where user log in and choose one of two choices (per user or global). Then its choice will save in database on the server. After that script will start and this script will modify etc/rspamd/settings.conf where it will create new setting for each user. This setting will disable symbols for the other classifier (so if user has chosen per_user classifier then BAYES_HAM and BAYES_SPAM symbols will be disabled). At the end, script will restart rspamd. This should be work, but its very complicated. I will be happy for any ideas.