Hello,

I already sent this messages but didn't get any reply at the moment. So I'm sending it back hoping it could wake up some spamassassin guru. Please if the message is not understandable, or not posted in the right place... let me know I'll do what's needed.

I am trying to setup spamassasin with per-user config:
user prefs are stored in ldap, bayes and awl in sql database.
Most of the things works but the sql parts.
Indeed when spamd proceed a message I get weired warning, about DB
initialisation problem.

#####################################################################
...
[12886] dbg: bayes: found bayes db version 3
[12886] dbg: bayes: unable to initialize database for
u...@domain.tld user, aborting!
[12886] dbg: config: score set 1 chosen.
[12886] warn: spamd: still running as root: user not specified
with -u, not found, or set to root, falling back to nobody
...
[12886] dbg: auto-whitelist: sql-based connected to
DBI:mysql:spamass:localhost
[12886] dbg: auto-whitelist: sql-based using username: nobody
[12886] dbg: auto-whitelist: sql-based get_addr_entry: found
...
#####################################################################

And so learned tokens and addresses belongs to user nobody instead of the
desired user.
As you can see

#####################################################################
mysql> select * from bayes_vars;
+----+----------+------------+-----------+-------------+-------------+------------------+--------------------+------------------+------------------+
| id | username | spam_count | ham_count | token_count | last_expire |
last_atime_delta | last_expire_reduce | oldest_token_age | newest_token_age |
+----+----------+------------+-----------+-------------+-------------+------------------+--------------------+------------------+------------------+
| 10 | nobody | 0 | 2 | 71 | 0 |
0 | 0 | 1249628492 | 1249628650 |
+----+----------+------------+-----------+-------------+-------------+------------------+--------------------+------------------+------------------+

mysql> select * from awl;
+----------+-----------------------------------+------+-------+----------+
| username | email | ip | count | totscore |
+----------+-----------------------------------+------+-------+----------+
| nobody | u...@domain.tld | none | 9 | -12.96 |
#####################################################################

In addition I have tested feeding the bayesian db with sa-learn but here
it works as expected
I am using spamassasin v3.2.3 on debian etch.
spamd is called like this:
spamd -D -x --ldap-config --max-children 5 --pidfile=/var/run/spamd.pid
-d
and spamc with "-t 60 -u <desired_user>"

Does anyone knows why I can't get the right username in sql db?

Reply via email to