File: README.testing

package info (click to toggle)
spamassassin 4.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,988 kB
  • sloc: perl: 88,863; ansic: 5,193; sh: 3,737; javascript: 339; sql: 295; makefile: 209; python: 49
file content (106 lines) | stat: -rw-r--r-- 3,228 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106

How to enable the SpamAssassin LDAP self-test
---------------------------------------------

- install openldap server, using apt-get etc.   On Debian (unstable),
  that's done as follows:

    sudo apt-get install slapd ldap-utils

  Then enter an admin password.


- Patch the 'inetorgperson.schema' file, found in the following locations:

        Fedora Core 1: /etc/openldap/schema/inetorgperson.schema
        Debian: /etc/ldap/schema/inetorgperson.schema

  as follows:

--- /etc/openldap/schema/inetorgperson.schema.default   2003-10-23 07:26:01.000000000 -0700
+++ /etc/openldap/schema/inetorgperson.schema   2004-02-05 22:07:01.000000000 -0800
@@ -121,6 +121,13 @@
        DESC 'RFC2798: personal identity information, a PKCS #12 PFX'
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.5 )
 
+# spamassassin
+# see http://SpamAssassin.org/ .
+attributetype ( 2.16.840.1.113730.3.1.220
+       NAME 'spamassassin'
+       DESC 'SpamAssassin user preferences settings'
+       EQUALITY caseExactMatch
+       SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
 
 # inetOrgPerson
 # The inetOrgPerson represents people who are associated with an
@@ -138,5 +145,5 @@
                labeledURI $ mail $ manager $ mobile $ o $ pager $
                photo $ roomNumber $ secretary $ uid $ userCertificate $
                x500uniqueIdentifier $ preferredLanguage $
-               userSMIMECertificate $ userPKCS12 )
+               userSMIMECertificate $ userPKCS12 $ spamassassin )
        )


- set up according to
  http://yolinux.com/TUTORIALS/LinuxTutorialLDAP.html#TUTORIAL . To go into
  some detail, here's what you need to do...
 

- Edit the slapd.conf file, and add the "o=stooges" suffix, so that the LDIF
  file we'll be using will be valid.

  On Debian, this means changing the existing /etc/ldap/slapd.conf file
  according to these substitutions:

    s/"dc=jmason,dc=org"/"o=stooges"/g
    s/"cn=admin,dc=jmason,dc=org"/"cn=StoogeAdmin,o=stooges"/g

  Also, add these two lines to set the "root" password so the LDIF file
  can be loaded (ONLY FOR TESTING! DO NOT DO THIS ON A LIVE SERVER!):

    rootdn      "cn=StoogeAdmin,o=stooges"
    rootpw      secret1

  On Fedora Core 1, you can use the file from
  http://yolinux.com/TUTORIALS/OpenLDAP2.0-stooges-slapd.conf-sample.txt 
  pretty much as-is.


- Next, create the storage directories:

    sudo mkdir /var/lib/ldap/stooges /var/lib/ldap/fraternity
    sudo chown ldap.ldap /var/lib/ldap/stooges    [Fedora Core only]
    sudo chown ldap.ldap /var/lib/ldap/fraternity [Fedora Core only]


- And start the server:

    sudo /etc/rc.d/init.d/ldap start              [Fedora Core only]
    sudo /etc/init.d/slapd start                  [Debian only]


- Now load the LDIF data for our testing: (this LDIF file adds a "spamassassin"
  line to the "curley" user.)

    ldapadd -f ldap/sa_test.ldif -xv -D "cn=StoogeAdmin,o=stooges" \
		-h 127.0.0.1 -w secret1


- install Net::LDAP using CPAN:

    perl -MCPAN -e shell
    install Convert::ASN1
    install Net::LDAP
    quit


- create the test flag file:

    touch t/do_ldap


- now "make test" will test against the LDAP server as well.  You can
  also run "cd t; ./spamd_ldap.t" to run just that test directly.