Jari Fredriksson wrote:
> On 12/03/2015 02:29 AM, Charles Sprickman wrote:
>> I had a look at that page - I use mysql to store the data, have
>> multiple spamd boxes, and spamc on the inbound servers passing mail to
>> spamd once all the “front door” checks are done.  In that config, I
>> end up with unique per-user bayes tokens.  I’m looking to just pool
>> everyone together, but don’t see an obvious way to do that.  It seems
>> like folks in this thread are however doing that somehow (perhaps just
>> because they are using a milter or similar).


> I have a similar setup. I use "spamc -d spamd -u spam ..." and I think
> that -u spam is all it takes to make it site wide. Not very complex?

That'll give you a global Bayes, but it also eliminate any per-user
settings you might want to keep using, because you're not letting spamd
"know" about any different users.

We use these settings (watch for word wrap):

---

bayes_store_module Mail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn DBI:mysql:spamassassin:[ip]
bayes_sql_username spamassassin
bayes_sql_password ********
bayes_sql_override_username spamassassin

# awl
auto_whitelist_factory Mail::SpamAssassin::SQLBasedAddrList
user_awl_dsn DBI:mysql:spamassassin:[ip]
user_awl_sql_username spamassassin
user_awl_sql_password ********
user_awl_sql_table awl

# userprefs.  worksforme(TM)
user_scores_dsn               DBI:mysql:spamassassin:[ip]
user_scores_sql_username      spamassassin
user_scores_sql_password      ********
# Need a custom query to do domainwide settings.  Default does not have
the third WHERE clause
user_scores_sql_custom_query  SELECT preference, value FROM _TABLE_
WHERE username = _USERNAME_ OR username = '@GLOBAL' OR username =
concat('@~',_DOMAIN_) ORDER BY username ASC

# don't pass mail through unscanned if there's an error trying to get
userprefs.
# Note that "no userpref entries" is NOT an error.
# Note also this requires a custom patch
user_scores_fallback_to_global  1

---

to have per-user AWL, SQL userprefs including domainwide settings, and
global Bayes all in the same MySQL database.

A read of the fine manual page (Mail::SpamAssassin::Conf) will usually
turn up all the necessary directives for whatever you're trying to do.

-kgd

Reply via email to