How to enable the SpamAssassin LDAP self-test --------------------------------------------- t/spamd_ldap.t runs only when the file t/do_ldap exists. It needs the Perl module Net::LDAP and an LDAP server on localhost holding the o=stooges test data in ldap/sa_test.ldif, with cn=StoogeAdmin,o=stooges as its admin and secret1 as the password (ONLY FOR TESTING! DO NOT DO THIS ON A LIVE SERVER!). These steps are for an OpenLDAP server configured through cn=config, as current packages are. The commands are for Debian and Ubuntu; other systems differ in package names, in the user slapd runs as and in where it keeps its databases (edit olcDbDirectory in ldap/sa_test_db.ldif to match). - Install the server, the client tools and Net::LDAP: sudo apt-get install slapd ldap-utils libnet-ldap-perl - Add the 'spamassassin' attribute that holds the user preferences: sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f ldap/sa_test_schema.ldif - Create the o=stooges database: sudo install -d -o openldap -g openldap -m 0700 /var/lib/ldap/stooges sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f ldap/sa_test_db.ldif - Load the test data: ldapadd -x -H ldap://127.0.0.1 -D "cn=StoogeAdmin,o=stooges" -w secret1 \ -f ldap/sa_test.ldif - Create the test flag file: touch t/do_ldap - Now "make test" will test against the LDAP server as well. You can also run just that test with: make test TEST_FILES="t/spamd_ldap.t"