You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Follow the instructions to be able to run the unit tests (setting up virtualenv, installing deps)
download and install latest spamassassin in a separate prefix
run sa-update to get latest config
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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: