[sam] problems with retrieving data from db

t macek maca02 at atlas.cz
Thu Jun 26 23:53:21 PDT 2003


Hi, I'm using SpamAssassin with the sql support and SAM for configuring of 
the user preferences. I'm using PostgreSQL.
While I was using the db table without the SAM, everything worked. I had 
this table (named "spam"):

	create table spam (username varchar(100), preference varchar(100), value 
varchar(100));

Nowadays, I have a new table, acording to some SAM's file for mysql, look 
like this (named "spam2"):

	horde_id	username	preference	value	prefid

I'm NOT using the Horde for login, I use directly the IMP instead. I 
programmed my own SpamAssassin plugin into the IMP menu, and for the login 
name I used the "$_SESSION['imp']['user']" for storing user preferences in 
the table. The $_SESSION['imp']['user'] contains "username at someadress.cz".

Now I see, that SAM uses the "this->_username", for the username, 
containing always the "username at someadress.cz@domain.cz". That's fine, but 
my SA can't recognize that username at the data retrieving and the 
preference is NOT set and used. How can I fix this problem? Isn't it wrong 
to use the "this->_username"? The users in our domains are uniquely 
selected by the unique username...

Thank you very much for help

-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/


More information about the sam mailing list