> I have been getting this error for some time now and have been trying to > find the root cause of it. > > > spamd[2681]: ldap: failed to load user scores from LDAP server, ignored > (Can't locate object method "schema" via package "URI::ldap" at > /usr/share/perl5/Mail/SpamAssassin/Conf/LDAP.pm line 133, <GEN13> line 2. > > > I did an upgrade about 2 weeks ago to perl and a few modules, I really am > not sure what part if caused this. > > If anyone has a clue please help me out on this. I have looked through the > list and on the Net trying to find something close and I have come up with > very little. Really nothing related to spamassasin and ldap. >
OK, after having looked around a bit I have found that when going from SA 3.1.7 to 3.2 there as been included the marked snippet in the ldap lookups. my $port = $uri->port; my $base = $uri->dn; my @attr = $uri->attributes; my $scope = $uri->scope; my $filter = $uri->filter; my $schema = $uri->schema; <<<<<<<<<<<<<------ my %extn = $uri->extensions; # unused Now for some reason perl uri does not include schema as part of it's instructions for using uri::ldap =head1 NAME URI::ldap - LDAP Uniform Resource Locators =head1 SYNOPSIS use URI; $uri = URI->new("ldap:$uri_string"); $dn = $uri->dn; $filter = $uri->filter; @attr = $uri->attributes; $scope = $uri->scope; %extn = $uri->extensions; $uri = URI->new("ldap:"); # start empty $uri->host("ldap.itd.umich.edu"); $uri->dn("o=University of Michigan,c=US"); $uri->attributes(qw(postalAddress)); $uri->scope('sub'); $uri->filter('(cn=Babs Jensen)'); print $uri->as_string,"\n"; =head1 DESCRIPTION Notice that schema is not mentioned. I looked and found that yes schema is used in perl net ldap but I would assume if your going to use uri::ldap to parse the uri it needs to follow uri::ldaps requirements. I could be wrong, but it seems that the change made from 3.1 to 3.2 has been implemented wrong. Is Net::LDAP::Schema what should be used for getting the schema instead? Thanks Philip S. Hempel