<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<blockquote type="cite"
cite="mid:20240110131227.40b5f928@taurus.nifty.lan">
<pre>A harder way would also be highly appreciated 🙂 I'd go some lengths for avoiding a postgres/mariadb instance.
I suppose just whitelisting the "bayes_path" property in the user-settings would impose a trove of new problems?</pre>
</blockquote>
<p>I don't know what you mean by whitelisting the property. The
reason for bayes_path "not parsing, administrator setting" seems
hardcoded in SpamAssassin. A dirty solution would be to change it
into a non-admin property, but it requires knowledge of SA
internals which can change any time, so here be dragons.<br>
</p>
<p>
<blockquote type="cite">root@e5ddc15080cb:~# cat
/etc/amavis/conf.d/50-user<br>
use strict;<br>
package Amavis::SpamControl::SpamAssassin::Coderdude {<br>
 use base 'Amavis::SpamControl::SpamAssassin';<br>
 sub new_SpamAssassin_instance {<br>
   my $instance =
$_[0]->SUPER::new_SpamAssassin_instance(@_);<br>
  Â
$instance->{spamassassin_obj}{conf}{parser}{command_luts}{bayes_path}{is_admin}
= 0;<br>
   $instance;<br>
 }<br>
}<br>
$sa_debug = 'all';<br>
@spam_scanners = (['SpamAssassin',
'Amavis::SpamControl::SpamAssassin::Coderdude']);<br>
@sa_userconf_maps = ({<br>
 '<a class="moz-txt-link-abbreviated" href="mailto:user1@example.com">user1@example.com</a>' => '/tmp/sa_user1/user.cf',<br>
 '<a class="moz-txt-link-abbreviated" href="mailto:user2@example.com">user2@example.com</a>' => '/tmp/sa_user2/user.cf',<br>
});<br>
1;<br>
<br>
root@e5ddc15080cb:~# cat /tmp/sa_user1/user.cf<br>
bayes_path /tmp/sa_user1/bayes<br>
root@e5ddc15080cb:~# cat /tmp/sa_user2/user.cf<br>
bayes_path /tmp/sa_user2/bayes<br>
<br>
root@e5ddc15080cb:~# amavisd debug 2>&1 | grep "SA dbg" |
grep "tie-ing to DB"<br>
[Testmail -> <a class="moz-txt-link-abbreviated" href="mailto:user1@example.com">user1@example.com</a>]<br>
... SA dbg: bayes: tie-ing to DB file R/O
/tmp/sa_user1/bayes_toks<br>
... SA dbg: bayes: tie-ing to DB file R/O
/tmp/sa_user1/bayes_seen<br>
... SA dbg: bayes: tie-ing to DB file R/W
/tmp/sa_user1/bayes_toks<br>
... SA dbg: bayes: tie-ing to DB file R/W
/tmp/sa_user1/bayes_seen<br>
[Mail -> <a class="moz-txt-link-abbreviated" href="mailto:user2@example.com">user2@example.com</a>]<br>
... SA dbg: bayes: tie-ing to DB file R/O
/tmp/sa_user2/bayes_toks<br>
... SA dbg: bayes: tie-ing to DB file R/O
/tmp/sa_user2/bayes_seen<br>
... SA dbg: bayes: tie-ing to DB file R/W
/tmp/sa_user2/bayes_toks<br>
... SA dbg: bayes: tie-ing to DB file R/W
/tmp/sa_user2/bayes_seen<br>
</blockquote>
</p>
</body>
</html>