~ubuntu-branches/ubuntu/hoary/lurker/hoary

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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
Quick start
===========

0 Find and install development files for: 

   g++ >= 3.2            - http://gcc.gnu.org/
   zlib                  - http://www.gzip.org/zlib/
   mimelib  (kdenetwork) - ftp://download.uk.kde.org/pub/kde/stable/latest/src
   xsltproc (libxslt1)   - http://xmlsoft.org/XSLT/
 
 If you need to, lurker can be built using only g++ 2.95, however 3.2+ is
 recommended as the resulting binaries are much smaller and faster.
 
 If you do not want kdenetwork, you can also download mimelib separately
 from http://sourceforge.net/project/showfiles.php?group_id=8168 and tell
 lurker to compile it and statically link to it.
 
 xsltproc is not strictly required for lurker. It is not used during compile
 and is only used if your lurker.conf references it. However, it is the
 preferred method for rendering html, so we recommend installing it.
 
 For debian: apt-get install xsltproc libmimelib1-dev g++ zlib1g-dev
 
1 [flags] ./configure [options]
  
  To control the mimelib location, setting these options may help:
  --with-mimelib-local        Use internal lurker/mimelib/*
  --with-mimelib-include=DIR  Location of mimelib/message.h
  --with-mimelib-libname=LIB  Try an alternative library name
  
  To control the zlib location, setting these options may help:
  --with-zlib-include=DIR     Location of zlib.h
  --with-zlib-libname=LIB     Try an alternative library name
  
  To control the environment, variants of these flags may help:
  LDFLAGS="-L/sw/lib"
  CPPFLAGS="-I/sw/include -DDW_UNIX"
  
2 make

3 make install	(as root if you don't have permission)
  
  You may want to strip the binaries as they can be quite large.

  This will install these files:
  
  	/usr/local/lib/cgi-bin/*.cgi
  		- The CGIs which power lurker
  		- These must be placed such that the webserver can run them
  	/usr/local/var/www/lurker/*
  		- The lurker content which must be web accessible
  		- The subdirectories "attach, list, mbox, message, mindex,
  		  search, splash, and thread" must all be writeable by
  		  whatever user executes lurker.cgi
  	/usr/local/bin/lurker-*
  		- Command-line utilities for importing email, cleaning
  		  cached web files, and interfacing with shell scripts
  	/usr/local/var/lib/lurker/*
  		- The lurker database directory where mail is imported to
  		- The directory and its contents must be writeable by the
  		  user who runs lurker-index
  		- This must be readable by the user who runs lurker.cgi
  
  You must install the file /usr/local/etc/lurker.conf by hand.
  Then customize it using the provided lurker.conf as a starting point.

4 Setup delivery of new mail to lurker-index
  
  For procmail, 
	:0 w
	* ^X-Mailing-List: <debian-japanese@lists.debian.org>.*
	| lurker-index -c /etc/lurker.conf -l japanese -m
  ... works for me.

5 Feed archived mail through lurker-index.
  
  lurker-index -c /etc/lurker.conf -l devel -b 5 < debian-devel.mbox
  
  Keep in mind these points:
  
    a. Lurker imports benefit primarily from a fast CPU and fast RAM.
       Lurker rendering of pages benefits from more RAM (for disk cache).
    
    b. The lurker database will consume space on the order of 40% of the
       mailboxes it indexes. You must keep the mbox lurker creates, 
       although the original mbox is not required after lurker-index.
    
    c. Nearly all of the processing time lurker spends is on importing
       messages. Once you have indexed your archive, lurker no longer needs
       as much resources.
    
6 Setup a cronjob to update the archive every 15 minutes
  
  0,15,30,45 * * * * lurker-prune -c /etc/lurker.conf -d /path/to/www/lurker
  
  This must be run with the ability to read and delete files from the
  web-server cache directory.
  
7 Configure your webserver.
  
  You must make certain that .xsl and .xml files have type text/xml.
  For email reply support .rfc822 must have type message/rfc822.
  You must set the default charset to UTF-8 for these files.
  You must make lurker your 404 error handler or another way of creating
      missing cache files (eg: apache's RewriteRule).
  You must pass the config file and lurker's document root to lurker.cgi 
      as ? delimited arguments in QUERY_STRING 'cfgfile?docdir'. The docdir
      is relative to the location of lurker.cgi and cfgfile is relative to
      the docdir.
  
  NOTE: The docdir here is the location of lurker.docroot.
  This has nothing at all to do with your webservers document root.
  Typically this is /usr/local/var/www/lurker or /var/www/lurker.
  
  If you run apache with a directory structure like:

	www/
		lurker.conf
		cgi-bin/
			lurker.cgi
			keyword.cgi
			jump.cgi
		htdocs/
			.htaccess
			index.html
			browserdetect.js
			lurker.docroot
			splash/
			search/
			mindex/
			...

   then .htaccess should contain:

	AddType text/xml .xsl
	AddType text/xml .xml
	AddType message/rfc822 .rfc822
	AddDefaultCharset UTF-8
	ErrorDocument 404 /cgi-bin/lurker.cgi?../lurker.conf?../htdocs
   
   or, using the Rewite Engine (avoids 404 log messages):

	AddType text/xml .xsl
	AddType text/xml .xml
	AddType message/rfc822 .rfc822
	AddDefaultCharset UTF-8
        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-s
        RewriteRule (attach|list|mbox|message|mindex|search|splash|thread)/ /cgi-bin/lurker.cgi?../lurker/lurker.conf?../htdocs [T=application/x-httpd-cgi,L,PT]

8 point your browser at the url where lurker is installed

Enjoy!