You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by olicat <pa...@googlemail.com> on 2006/07/12 15:55:53 UTC

LDAP & Spamassassin

Hi all,
I'm trying to load per-user spamassassin rules that are stored in ldap.
My spamassassin .cf file loads tries to load the data like this:

user_scores_dsn
ldap://calf/dc=bsfbh,dc=com?internalSpamassassinConfig?sub?uid=__USERNAME__
user_scores_ldap_username
uid=spamassassin,ou=system,dc=management,dc=internal,dc=com
user_scores_ldap_password password

but testing with spamc like so:
spamc -x -U /var/run/spamd-socket -u welcome@external.co.uk < spam.txt
doesn't match the ldap rule/attributes my user has.

the ldap server logs display the following:
Jul 12 14:51:47 calf slapd[24267]: conn=912 op=0 BIND
dn="uid=spamassassin,ou=system,dc=management,dc=bsfbh,dc=com" method=128
Jul 12 14:51:47 calf slapd[24267]: conn=912 op=0 BIND
dn="uid=spamassassin,ou=system,dc=management,dc=bsfbh,dc=com" mech=SIMPLE
ssf=0
Jul 12 14:51:47 calf slapd[24267]: conn=912 op=0 RESULT tag=97 err=0 text=
Jul 12 14:51:47 calf slapd[24267]: conn=912 op=1 SRCH
base="dc=internal,dc=com" scope=2 deref=2
filter="(uid=welcome@external.co.uk)"
Jul 12 14:51:47 calf slapd[24267]: conn=912 op=1 SRCH
attr=internalSpamassassinConfig
Jul 12 14:51:47 calf slapd[24267]: conn=912 op=1 ENTRY
dn="uniqueIdentifier=40110e70-b382-0128-d213-001422b020f4,ou=people,uniqueIdentifier=0001,dc=external,dc=internal,dc=com"
Jul 12 14:51:47 calf slapd[24267]: conn=912 op=1 SEARCH RESULT tag=101 err=0
nentries=1 text=
Jul 12 14:51:47 calf slapd[24267]: conn=912 fd=32 closed (connection lost)

I think it may be due to how my users' spamassassin rule is defined? i have
3 attributes in the user object:
internalSpamassassinConfig describe X_TEST test rule
internalSpamassassinConfig body X_TEST /testrule/i
internalSpamassassinConfig score X_TEST 20

As I understood it, these attributes should be loaded in and read as one
single rule by spamassassin, but it doesn't seem as though ldap is returning
the correct values, so I'm a bit stuck here.

Any help would be appreciated. Thanks for reading.
-- 
View this message in context: http://www.nabble.com/LDAP---Spamassassin-tf1931001.html#a5289100
Sent from the SpamAssassin - Users forum at Nabble.com.