Author Topic: sauerprefs config setting the database connection string?  (Read 7996 times)

Offline kujoe2002

  • Jr. Member
  • **
  • Posts: 37
    • http://www.gpcpi.com/
sauerprefs config setting the database connection string?
« on: March 21, 2013, 05:20:45 PM »
So I'm trying to setup spam assassin using the Sauerprefs config file.  I uploaded the sauerprefs to the plugin folder.  I edited the main.inc file to add the string:


Quote
.....$rcmail_config['plugins'] = array(....'markasjunk2', 'sauserprefs', 'vcard_attachments',....

Now it tells me

Quote
* You must set the database connection string
* Enter the table name, name of the username field, preference field, and value
field

Can Anyone tell me (in layman's terms) what I'm supposed to do?  I tried looking up:

http://stackoverflow.com/questions/360024/how-do-i-set-a-connection-string-config-programatically-in-net

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring.aspx

http://www.connectionstrings.com/access

http://www.sqlstrings.com/

but am now more confused. 

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,077
Re: sauerprefs config setting the database connection string?
« Reply #1 on: March 22, 2013, 03:46:54 AM »
in the sauserprefs plugin folder there is a file called config.inc.php.dist you need to rename this to config.inc.php and fill in the config options inside it. that is where the db connection string and table settings go.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline kujoe2002

  • Jr. Member
  • **
  • Posts: 37
    • http://www.gpcpi.com/
Re: sauerprefs config setting the database connection string?
« Reply #2 on: March 22, 2013, 02:09:22 PM »
I had already renamed the file. 

Quote
// spamassassin database settings
$rcmail_config['sauserprefs_db_dsnw'] = 'mysql://username:password@localhost/database';

Am I changing this with the info in mySQL database file for the email?

Quote
// PEAR database DSN for read only operations (if empty write database will be used)
// useful for database replication
$rcmail_config['sauserprefs_db_dsnr'] = '';

I'm not sure what this is.  Can I leave it as is?


Quote
// table that holds user prefs
$rcmail_config['sauserprefs_sql_table_name'] = "userpref";

Is this the info I would find in the MySQL file for the email account?  Or do I leave as is?  And the rest of the file, are there changes I need to make or are these the default settings for the plugin?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,077
Re: sauerprefs config setting the database connection string?
« Reply #3 on: March 23, 2013, 05:25:15 AM »
Quote
Quote
// spamassassin database settings
$rcmail_config['sauserprefs_db_dsnw'] = 'mysql://username:password@localhost/database';

Am I changing this with the info in mySQL database file for the email?

no, it should be the connection string for the database while holds you spamassassin prefs

Quote
Quote
// PEAR database DSN for read only operations (if empty write database will be used)
// useful for database replication
$rcmail_config['sauserprefs_db_dsnr'] = '';

I'm not sure what this is.  Can I leave it as is?

yes

Quote
Quote
// table that holds user prefs
$rcmail_config['sauserprefs_sql_table_name'] = "userpref";

Is this the info I would find in the MySQL file for the email account?  Or do I leave as is?  And the rest of the file, are there changes I need to make or are these the default settings for the plugin?

no, these settings should matach your spamassassin sql settings.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline kujoe2002

  • Jr. Member
  • **
  • Posts: 37
    • http://www.gpcpi.com/
Re: sauerprefs config setting the database connection string?
« Reply #4 on: April 20, 2013, 12:11:33 PM »
OK, So I did everything you said and I'm still getting spam from the same email address.  does it take a little time before spam assassin works?