Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 617950 - mail-filter/spamassassin-3.4 with redis support for bayes store
Summary: mail-filter/spamassassin-3.4 with redis support for bayes store
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Philippe Chaintreuil
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-09 10:02 UTC by Deniss Gaplevsky
Modified: 2017-08-04 20:58 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Deniss Gaplevsky 2017-05-09 10:02:22 UTC
spamassassin supports redis as bayes store in 3.4 branch

Please update ebuild to allow redis as bayes store engine:
https://spamassassin.apache.org/full/3.4.x/doc/Mail_SpamAssassin_BayesStore_Redis.html

Reproducible: Always
Comment 1 Michael Orlitzky gentoo-dev 2017-05-09 14:54:29 UTC
Redis support is enabled automatically, regardless of your USE flags. I agree that this is confusing, but there's no obvious way to fix it (without introducing something else confusing).

For now, I've updated the description of the "bayes" USE flag to explain this... you can find some of my reasoning in the commit message below. Hopefully this is an acceptable fix. Can you please confirm that the Redis support works, even if you have USE="-bayes" set?

commit ddeb03794d7efd423398bc175b824ea158102578
Author: Michael Orlitzky <mjo@gentoo.org>
Date:   Tue May 9 10:51:47 2017 -0400

    mail-filter/spamassassin: update description of USE=bayes flag.

    A user asked us to enable Redis support for SpamAssassin in bug
    617950, but it should already be there. SpamAssassin has its own
    "TinyRedis" client, and doesn't pull in any extra dependencies to
    enable it.

    This is somewhat confusing when you look at the REQUIRED_USE for
    SpamAssassin, which suggests that, to enable USE=bayes, you need to
    pick a particular database. I only see three solutions, none of which
    are great:

      1. Introduce a USE=redis flag that does nothing.

      2. Try to document the USE=bayes flag better, to make it clear
         that you get Redis support even with USE="-bayes".

      3. Allow USE=bayes without picking a database driver.

    The first I've ruled out for aesthetic reasons, and the third I think
    could do more harm than good (to everyone who wants bayes without
    Redis). Therefore I've taken the second option, and updated the
    documentation for the local USE=bayes flag. It now mentions that you
    don't need USE=bayes to get the Redis bayes backend -- it's always
    there.

    Gentoo-Bug: 617950
Comment 2 Deniss Gaplevsky 2017-05-11 08:42:13 UTC
IMO the first solution looks better than others.
It's pretty clean from user point to enable "bayes" and "redis" USE flags to get required functionality.

It is really confusing to unset "bayes" to get bayes with redis support !
Comment 3 Michael Orlitzky gentoo-dev 2017-05-12 19:37:25 UTC
On second thought, there is a fourth option that I will probably adopt for spamassassin-3.4.2 (coming any day now).

When I took over maintainership, you were required to choose one of

  berkdb mysql postgres sqlite

In other words, bayes support wasn't "optional" and you had to choose a database -- there was no "bayes" USE flag. I don't use bayes, so I added the "bayes" flag to let me proceed without selecting a database type.

In hindsight, since Redis was supported back then, a better choice would have been to simply drop the REQUIRED_USE constraint that forced you to pick a database. I think that's what we should do for v3.4.2:

  * Drop USE=bayes.
  * Drop REQUIRED_USE.
  * Let people set USE=mysql, USE=berkdb, etc. to get support for
    those databases if they need them.
  * Always get the built-in support for Redis, without having to unset
    USE=bayes (because there will be no USE=bayes).

Anyone see a problem with that?

I only propose that we wait for v3.4.2 so that people will pay more attention to the USE changes.
Comment 4 Deniss Gaplevsky 2017-05-17 12:29:46 UTC
fine for me
Comment 5 Michael Orlitzky gentoo-dev 2017-08-04 20:58:27 UTC
The next version of SA still hasn't materialized, so I did this in spamassassin-3.4.1-r12. Thanks for the report.