sa_userconf_maps and sa_username_maps syntax question

Mark Martinec Mark.Martinec+amavis at ijs.si
Thu Sep 8 19:50:06 CEST 2011


Matt,

> I examined the patch file that was presented and
> I have to go a different direction. Since required_score is somewhat
> handled already via the policy system (although users cannot specify their
> own 'score' they can indeed change policies, which in turn affects score),
> I think I'm going to focus on per-user Bayes.

Makes sense, per-user Bayes is much more efficient than per-user
SpamAssassin preferences/config.

> What part of amavisd-new goes and checks per-user bayes? I see nothing in
> earlier examples nor in the patch which address having amavisd-new handle
> per-user Bayes classification.

There is a 80+ line description of @sa_username_maps and @sa_userconf_maps
with examples in the 2.7.0 release notes.

Search for sections starting with:
  - per-recipient (or per- policy bank, or global) SpamAssassin configuration
and
  - per-recipient (or per- policy bank) SpamAssassin SQL database usernames

> Or is that solely done through SA's configuration?

Before a call to SpamAssassin, amavisd tells SpamAssassin which username
to use. The rest (SQL lookup etc.) is done by SpamAssassin.

> If no changes are required in amavisd-new to get per-user
> Bayes working, then I apologize.

No changes should be necessary, apart from configuring @sa_username_maps
in amavisd.conf.

> I can get SA's /etc/spamassassin/local.cf
> to use the per-user Bayes. I'm just new to amavis and assume that amavis
> has to handle checking against the per-user Bayes database. Is this
> correct?

When per-recipient bayes is needed, amavisd calls SpamAssassin possibly
multiple times for multiple recipients of a message, once for each unique
username. Before the call the username is passed to SpamAssassin,
the rest is SpamAssassin's task.

  Mark


More information about the amavis-users mailing list