Hi there,
I have to set up the SA Plugin tp work in Roundcube and Sapamassassin with stored user_prefs in mysql. After installing and configuring, I see that the plugin make the following statement to the DB:
INSERT INTO sa_user_prefs (vuser_email, preference, value) VALUES ('username', 'ok_locales', 'zh en ja ko ru th')]
Looks fine, but in our db the username is not in table, cause this is a virtual_alias. The field must be a emailaddress.
Does anyone know how to change the INSERT Value from "username" to "users mailaddress"?
Thanks
Tom
hi again,
maybe my question is not realy clear, so I will explain it again:
In my database table "sa_user_prefs" is like this:
=============================
| id | vuser_email | preference | value |
=============================
The field "id" is not interessting here. "vuser_email" is filled up wirh mail-addresses, "preference" and "value" with sa stuff.
Unfortunately the sql statement dont use a mailadress for "vuser_email", but an username.
Now I need to know, if there is a possibility to conf sauserprefs to use an email not an username in steh sql.
Does anybody know how to handle that?
Best regards
Tom
EDIT: We use usernames for roundcube login. Maybe this is the point! But this Setup cannot be changed, because this is a virtual_users setup. Maybe it is possible to transform username to mailadress with a variable change? Does someone know in wich roundcube variable the mailadress goes?
http://trac.roundcube.net/wiki/Plugin_Hooks#email2user
http://trac.roundcube.net/wiki/Plugin_Hooks#user2email
I'm not sure if you are familiar with PHP and the Roundcube Plugin API. But these two hooks could be used to archieve what you want.
this change makes it possible to configure the username
https://github.com/JohnDoh/Roundcube-Plugin-SpamAssassin-User-Prefs-SQL/commit/e649df789cbc0c647ecc01ebcf458ebf13b4919a