Author Topic: SpamAssassin MySQL patch  (Read 28412 times)

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,328
SpamAssassin MySQL patch
« Reply #45 on: January 18, 2009, 07:44:44 AM »
I have added a new version for the latest SVN to the site. It has the new address sync code that will work with the + sign as well as the addressbook.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
SpamAssassin MySQL patch
« Reply #46 on: January 19, 2009, 03:52:39 AM »
many thx works fine !!!

Offline maxxim

  • Newbie
  • *
  • Posts: 4
SpamAssassin MySQL patch
« Reply #47 on: February 09, 2009, 12:11:49 PM »
Hi,
I installed the plugin, now i get the spam screen in the user preferences section, but whenever i make a change to the spam settings i get an error that the changes cannot be made, and they are not saved.
A red error msg at the top of the screen saying: Cannot change spam settings.
Prolly missed something somewhere... any ideas ?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,328
SpamAssassin MySQL patch
« Reply #48 on: February 09, 2009, 04:06:16 PM »
double check everything in your config (plugins/sauserprefs/config.inc.php), make sure all the table and field names are correct. or may be add some debug statements to program/steps/settings/save_sauserprefs.inc, then you should be able to see the SQL queries its executing and hopefully where it is going wrong.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline maxxim

  • Newbie
  • *
  • Posts: 4
SpamAssassin MySQL patch
« Reply #49 on: February 10, 2009, 06:32:51 AM »
Thx for the reply, i made the mistake of setting the roundcube db in the settings, changed it into the spamassassin db and it works, i can see and change the settings.
I still get another error however.

Code: [Select]
DB Error in /home/www/mail/program/include/rcube_mdb2.php (255): _doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE mdb2_statement_mysql_3b6f80edc47aba5da41b5709a5637bdd739cafda7 FROM 'SELECT 1 FROM session\n WHERE sess_id=?']
[Native code: 1146]
[Native message: Table 'spamassassin.session' doesn't exist]

SERVICE CURRENTLY NOT AVAILABLE!

_doQuery: [Error message: Could not execute statement] [Last executed query: PREPARE mdb2_statement_mysql_3b6f80edc47aba5da41b5709a5637bdd739cafda7 FROM 'SELECT 1 FROM session\n WHERE sess_id=?'] [Native code: 1146] [Native message: Table 'spamassassin.session' doesn't exist]

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,328
SpamAssassin MySQL patch
« Reply #50 on: February 10, 2009, 09:26:21 AM »
:S i'm not sure what has happened there, is it possible that you have got `$rcmail_config['db_dsnw']` and `$sauserprefs_config['db_dsnw']` mixed up? it looks like it is trying to use the spamassassin db when it should be using the roundcube one.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline maxxim

  • Newbie
  • *
  • Posts: 4
SpamAssassin MySQL patch
« Reply #51 on: February 10, 2009, 10:09:13 AM »
Hi, i thought the same, but i checked....
$sauserprefs_config['db_dsnw'] = 'mysql://spam:xxx@localhost/spamassassin';
$rcmail_config['db_dsnw'] = 'mysql://roundcube:xxx@localhost/roundcubemail';

Seems ok, so somwhere the plugin is not correctly switching back to the correct db. The weird thing is that except for the error message it works, the settings are saved.

ok i found the prob. you cannot use the same user for both db's, i added another user and it works fine now.
« Last Edit: February 10, 2009, 10:48:50 AM by maxxim »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,328
SpamAssassin MySQL patch
« Reply #52 on: February 11, 2009, 03:37:02 AM »
I can't see why that is happening I will have to do some more debugging, it only occurs when the username and pass are the same for both connections. Thanks for figuring out what the problem was.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline sobia

  • Newbie
  • *
  • Posts: 2
SpamAssassin MySQL patch
« Reply #53 on: February 17, 2009, 08:56:57 AM »
I installed this plugin n now when i click user settings tab, it gives me a blank page n the logs show;

PHP Warning:  include_once(textfield.php) [function.include-once]: failed to open stream: No such file or directory in /home/myserver/public_html/mail/program/include/iniset.php on line 93
[17-Feb-2009 07:52:28] PHP Warning:  include_once() [function.include]: Failed opening 'textfield.php' for inclusion (include_path='/home/myserver/public_html/mail/:/home/myserver/public_html/mail/program:/home/myserver/public_html/mail/program/lib:/home/myserver/public_html/mail/program/include:.:/usr/lib/php:/usr/local/lib/php') in /home/myserver/public_html/mail/program/include/iniset.php on line 93
[17-Feb-2009 07:52:28] PHP Fatal error:  Class 'textfield' not found in /home/myserver/public_html/mail/program/steps/settings/func.inc on line 43


is there a way i can uninstall the patch?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,328
SpamAssassin MySQL patch
« Reply #54 on: February 17, 2009, 10:36:34 AM »
hmmm thats a bit odd, I'm sorry about that. The patch doesn't make any changes to program/steps/settings/func.inc which is apparently where the problem is. Did the patch apply cleanly? What version of RC are you using?

To reverse a patch just run the command again with -R.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline gmusco

  • Newbie
  • *
  • Posts: 1
SpamAssassin MySQL patch
« Reply #55 on: March 08, 2009, 09:45:52 PM »
Hello, thx by the patch.

I had that modified the settingstabs.html file, adding  this lines:




Because i didnt see the tab "Spam", its right ?

Thx

Gabriel

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,328
SpamAssassin MySQL patch
« Reply #56 on: March 09, 2009, 02:39:12 PM »
Its
Code: [Select]
<span id=&quot;settingstabsauserprefs&quot; class=&quot;tablink&quot;><roundcube:button command=&quot;sauserprefs&quot; type=&quot;link&quot; label=&quot;sauserprefs&quot; title=&quot;sauserprefssettings&quot; class=&quot;tablink&quot; /></span>
The title attribute is different from what you put but thats it, and you dont need
that is in the file already.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline winnetou

  • Newbie
  • *
  • Posts: 1
    • http://valhalla.org.pl
SpamAssassin MySQL patch
« Reply #57 on: September 29, 2011, 12:25:53 PM »
Hello everybody ;)

I'm new here. I'm using SA-user-prefs plugin - great thing and I've found some typo and misspellings in localization pl_PL.inc.
I've made some corretions and new version is available at my SVN repo

http://svn://valhalla.org.pl/sa-user-prefs

Didn't know where I should report this so I choose forum ;)


Best regards from Poland