Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplest possible spam matching fails #92

Open
nresare opened this issue Apr 25, 2018 · 0 comments
Open

Simplest possible spam matching fails #92

nresare opened this issue Apr 25, 2018 · 0 comments

Comments

@nresare
Copy link
Contributor

nresare commented Apr 25, 2018

With the travis tests finally being green, I'm moving towards actually running OrangeAssassin on my incoming email. However, there was some obstacles in the way related to the bayes plugin, as details below.

Version information

Latest master 6740c10

Steps to replicate

  1. clone the OrangeAssassin repo
  2. Follow the instructions to be able to run the unit tests (setting up virtualenv, installing deps)
  3. download and install latest spamassassin in a separate prefix
  4. run sa-update to get latest config
  5. Attempt to run PYTHONPATH=. ./scripts/match.py -D -t --configpath ~/slask/sa/var/spamassassin/3.004001/updates_spamassassin_org --sitepath ~/slask/sa/etc/mail/spamassassin ~/slask/Mail-SpamAssassin-3.4.1/sample-spam.txt (assuming the spamassassin prefix is ~/slask/sa

Actual result

sqlalchemy.exc.UnboundExecutionError: Could not locate a bind configured on SQL expression or this Session

Expected result

A spam report fo the input sample would be printed to stdout.

Other notes

The reason for this error is that the bayes plugin expects to be able to contact a database. Adding for example bayes_sql_dsn sqlite:////Users/noa/.spamassassin/bayes.db to ~/.spamassassin/user_prefs fixes that problem.

Then, there is the problem of the plugin not handling an empty or nonexistent database (fixed by my PR #91)

When that is fixed, there are two logic errors in the way the bayes plugin communicates with the database, also fixed in the above mentioned PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants