sasql and Toaster

Started by btsteve, August 19, 2005, 12:55:03 PM

Previous topic - Next topic

btsteve

I have the Latest version or Toaster, and FreeBSD installed.
Everything has been running great, i am trying to get Spamassassin set up with the squirrel mail sasql plugin. I have read the directions, and have had no problem for the most part.

When i enable the plugin for Squirrle mail i get an error about sasql_db.php line 75 extention could not be found.

Line 75 has to do with the White List.


<?php// $Author: perlstalker $// $Id: sasql_conf.php.dist,v 1.15 2005/03/29 16:48:11 perlstalker Exp $global $SqlDSN, $SqlTable, $use_quick_link, $sasql_use_learn;// DSN for DB$SqlDSN = 'mysql://spamassassin:assSPAMing@localhost/spamassassin';// SpamAssassin userprefs table$SqlTable = 'userprefs';// Default domain// Set to your domain to have the domain appended to usernames// when working with the database. Set to '' or comment out to// disable. Note: If you are using multiple domains, the vlogin plugin// may work better. Actually, the vlogin plugin may work better in// general. However, this it a resonable workaround if your mail server// doesn't allow you to login as user@domain but you need to use the// domain in the SpamAssassin settings.//$default_domain = 'netstar-usa.com';// Make the $spam_folder below, a special folder.// If set to some true value, the spam folder will be auto created.// If you wish to make use of the Purge Spam Folder button, then this will// need to be set to 1$special_spam_folder = 1;// The name of the spam folder. Do not include the prefix if it is already// defined in the Squirrel Mail config already, i.e. if you have set// $default_folder_prefix in your config.php then set this variable// to be 'Spam'. If you don't have $default_folder_prefix set globally// and your IMAP server does have a require folder prefix, then you// may need to define this variable as 'INBOX.Spam'.$spam_folder = 'INBOX.Spam';// Add a link to the Options line in message header view to add/delete a// message address to the white/black list.$use_quick_link = True;// If you plan on using the process-spam.pl script or your own home grown// version, then setting this to True will allow the storage of emails// on your server for later processing through sa_learn.$sasql_use_learn = True;// If set to True, then the option to learn the message as spam will be// a link in the options line, otherwise it will be a button at the bottom// of the message. Note: This has no effect if $sasql_use_learn is False.$sasql_learn_option = True;// Set to '' to disable.// The included process-spam.pl script provides a way to learn messages// moved into these folders.$learn_spam_folder = 'INBOX.Learn Spam';$learn_fp_folder = 'INBOX.Learn FP';// Use SpamAssassin 2.43 options// SpamAssassin removed the 'report_header' and 'defang_mime' flags// from version 2.50 because of better MIME spam handling.// You can include those options by setting this to some True value.//// Note: This option is depricated in favor of the $allowed_params// list. It is here to for backwards compatability with// sasql_options-1.1.5.php.//$useSA2_43 = True;$useSA2_43 = False;// Global settings username key used to define system-wide preferences////$globalUsername = '!GLOBAL';$globalUsername = '@GLOBAL';// Allowed SpamAssassin paramaters.// These values must be defined in $sa_params below.// Currently defined values: 'required_hits', 'rewrite_subject',//   'use_terse_report', 'use_dcc', 'use_razor1', 'use_razor2',//   'always_add_headers', 'subject_tag', 'ok_languages'// See sa_opts-dist.php for a complete list of supported parameters.//$allowed_params = array('required_hits', 'rewrite_subject', 'subject_tag',//         'use_terse_report', 'use_dcc', 'use_razor2',//         'always_add_headers', 'ok_languages');$allowed_params = array('required_score', 'rewrite_header subject',         'ok_languages', 'use_dcc', 'use_razor2'         );$allowed_wl_params = array('whitelist_from', 'unwhitelist_from',            'blacklist_from', 'unblacklist_from',            'whitelist_to');// Sections to show.// This will insert the file $section.inc.php into sasql_options.php// where $section is the an element from $allowed_sections. You can use this// to add custom sections to your installation or reorder sections to match// your tastes.//  Sections://   General Sections://    purge         => Purge Spam Folder Button////   SpamAssassin Sections://    sa_abooksync  => Sync Address Book with Whitelist//    sa_whitelist  => Manage SA White/blacklists//    sa_settings   => Manage SA settings//   Note: sa_abooksync needs to be before sa_whitelist or changes won't be//   immediately visable.////   dspam Sections://    dspam         => opt-in/out of dpam//    dspam_primer  => A brief description of dspam and comparison to SA////   Section tools to make combining sections in to blocks.//   NOTE: The first start_section and last end_section are done for you.//    start_section => Start a new section block.//    end_section   => End a Section block//    divider       => shortcut for the common end_section, start_section case.$allowed_sections = array ('purge',            'divider',            'sa_abooksync', 'sa_whitelist',            'divider',            'sa_settings');// Only add these if $useSA2_43 is true.if ($useSA2_43){  array_push($allowed_params, 'report_header', 'defang_mime');}// SpamAssassin params$sa_params = array();$wl_params = array();include_once('sa_opts-dist.php');   // Bring in SA optionsif (file_exists('sa_opts.php')) {  include_once('sa_opts.php');}?>


Also i am not sure what i should but in the first few lines fo the process-spam.pl file.

#!/usr/local/bin/perl -wuse strict;# $Id: process-spam.pl,v 1.4 2004/10/07 03:49:44 perlstalker Exp $use Pod::Usage;use File::Find;use DBI;################################################################################ Configuration################################################################################ Database driver.my $db_driver = 'mysql';# Database namemy $db_dbname = 'Accounts';# Database host namemy $db_host = 'localhost';# Database username and passwordmy $db_user = 'courier';my $db_pass = 'pass';# Number of times to retry DB connections.my $db_retries = 3;# SpamAssassin user preferences table.my $userprefs_table = 'SA_userprefs';# Log spam statisticsmy $spam_log = '/usr/local/www/cgi-data/spam.log';# Make script quieter.my $quiet = 0;# The default top level to the maildirs.my $default_maildir = '/var/mail/virtual';# Spam folder namemy $spam_folder = 'INBOX.Spam';# LEARNING OPTIONS# Path to sa-learnmy $sa_learn = '/usr/local/bin/sa-learn';# Path to dspammy $dspam = '/usr/local/dspam/bin/dspam';# These folder named should match $learn_spam_folder and $learn_fp_folder# in sasql_conf.php# Learn spam foldermy $learn_spam = 'INBOX.Learn Spam';# Learn false positivemy $learn_fp = 'INBOX.Learn FP';# Hmm. It seems that sa-learn doesn't support SQL user prefs or# virtual users yet. Sad I've learned that SA is putting bayes stuff# in SQL in HEAD so perhaps soon.# Commands to run when learning spammy @learn_spam_cmds = (             "$sa_learn --spam --no-rebuild --configpath $default_maildir/{user}/.spamassassin < '{file}'",             "$dspam --user {user} --addspam < '{file}'"             );# Commands to run when learning false positivesmy @learn_fp_cmds = (           "$sa_learn --ham --no-rebuild --configpath $default_maildir/{user}/.spamassassin < '{file}'",           "$dspam --user {user} --falsepositive < '{file}'"           );


Please help

matt

Is your database named userpref, or userprefs?


btsteve

The database is spamassassin and the table is userpref, i tried changing that table in the config to userpref after you asked, and i still get the same thing.

btsteve

Now that you have pointed that out, i changed it in the sasql_conf.php file to userpref, the database is spamassassin.
still getting the same error.

I have not been able to find any refferenct to this on thin net.



index.php?t=getfile&id=5&private=0