VUser-SpamAssassin-SQL
view release on metacpan or search on metacpan
COPYING
INSTALL
lib/VUser/SpamAssassin/SQL.pm
lib/VUser/SpamAssassin/SQL/AWL.pm
lib/VUser/SpamAssassin/SQL/Bayes.pm
lib/VUser/SpamAssassin/SQL/Userprefs.pm
Makefile.PL
MANIFEST This list of files
README
META.yml Module meta-data (added by MakeMaker)
lib/VUser/SpamAssassin/SQL/Bayes.pm view on Meta::CPAN
use VUser::ResultSet;
use VUser::SpamAssassin;
use VUser::SpamAssassin::SQL;
use VUser::Meta;
use VUser::ExtLib qw(:config);
use VUser::ExtLib::SQL;
use VUser::Extension;
use base qw(VUser::Extension);
our $log;
our $c_sec = 'Extension SpamAssassin::SQL::Userprefs';
our %meta;
our $db;
my $dsn;
my $username;
my $password;
sub c_sec { return $c_sec; };
sub meta { return %meta; };
sub depends { qw(SpamAssassin::SQL); }
lib/VUser/SpamAssassin/SQL/Userprefs.pm view on Meta::CPAN
package VUser::SpamAssassin::SQL::Userprefs;
use warnings;
use strict;
# Copyright (c) 2007 Randy Smith <perlstalker@vuser.org>
# $Id: Userprefs.pm,v 1.2 2007/04/12 19:17:08 perlstalker Exp $
our $VERSION = '0.1.0';
use VUser::Log qw(:levels);
use VUser::ResultSet;
use VUser::SpamAssassin;
use VUser::SpamAssassin::SQL;
use VUser::Meta;
use VUser::ExtLib qw(:config);
use VUser::ExtLib::SQL;
use VUser::Extension;
use base qw(VUser::Extension);
our $log;
our $c_sec = 'Extension SpamAssassin::SQL::Userprefs';
our %meta;
our $db;
my $dsn;
my $username;
my $password;
sub c_sec { return $c_sec; };
sub meta { return %meta; };
sub depends { qw(SpamAssassin::SQL); }
lib/VUser/SpamAssassin/SQL/Userprefs.pm view on Meta::CPAN
$sth->finish;
return $rs;
}
1;
__END__
=head1 NAME
VUser::SpamAssassin::SQL::Userprefs - vuser SpamAssassin SQL user preferences extension
=head1 DESCRIPTION
VUser::SpamAssassin::SQL::Userprefs is an extension to vuser that allows one to view and modify
users' SpamAssassin preferences in an SQL database.
=head1 CONFIGURATION
[vuser]
extensions = SpamAssassin::SQL::Userprefs
[Extension SpamAssassin::SQL::Userprefs]
# User scores database username and password.
# The DSN's here are in the same format as defined in the sql/README*
# files in the SpamAssassin package.
# This user needs select, insert and delete permissions.
# If the dsn is not set, the connection from SpamAssassin::SQL.
#dsn = dbi:mysql:localhost
#username = sa
#password = a-password
## SQL Queries
lib/VUser/SpamAssassin/SQL/Userprefs.pm view on Meta::CPAN
# Get the user's preferences
# Fixed columns:
# 1 username
# 2 preference
# 3 value
show_query = SELECT username,preference,value from userpref where username = %u
=head1 BUGS
VUser::SA::SQL::Userprefs doesn't handle preferences with multiple values
(ex. blacklist_from) very well. It can't add them and attempting to modify
them will change all of the values unless you contruct the query very
carefully.
=head1 AUTHOR
Randy Smith <perlstalker@vuser.org>
=head1 LICENSE
( run in 0.972 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )