root/doc/Lancelot-HOWTO.txt

Revision 316:e108bea0d05c, 9.7 KB (checked in by Anselm Lingnau <anselm@…>, 9 months ago)

Various changes and improvements to the Project Lancelot HOWTO.

Line 
1= Project Lancelot HOWTO =
2
3== Overview ==
4
5This document gives a brief introduction to installing and operating
6Project Lancelot lists.
7
8
9== Creating a list ==
10
11To create a Project Lancelot list, invoke the pl-init(1) command with
12the list address and the list owner's (your) address as its
13arguments. For the purposes of this example, let's assume that the
14list is to be called ''test@example.com'', and that you're Alfred
15E. Newman at ''alfred@example.com'':
16{{{
17  $ pl-init test@example.com alfred@example.com
18}}}
19This will create a ''.pl'' directory inside your home directory (if it
20doesn't already exist) and, within that directory, a directory called
21''test@example.com'' containing a file called ''list.db''. This file
22is a database that stores the list configuration and (usually)
23subscriber addresses and options.
24
25The next step is to ensure that mail sent to ''test@example.com''
26actually reaches Project Lancelot. How to do this in general is beyond the
27scope of this document, but one approach might involve setting up an
28''alias'' such as
29{{{
30   test: "|/usr/local/bin/pl-incoming --user alfred test@example.com"
31}}}
32in your system's alias database (usually /etc/aliases). You will probably
33need system administrator privileges to change this file.
34
35'''Note:''' Project Lancelot will be responsible not just for the
36''test@example.com'' address, but for all addresses of the form
37''test+SOMETHING@example.com'', too. You will need to make sure that your
38mail server actually accepts messages to all these addresses (for
39Postfix, check the ''recipient_delimiter'' parameter); Lancelot will
40take care of them.
41
42== Configuring the new list ==
43
44The new list should come with a fairly sensible configuration already, but
45it is more than likely that you will want to change this and that. Refer
46to LancelotConfiguration to see the most important parameters that you
47can set.
48
49Use the pl-conf(1) to look at and change configuration parameters. You can
50inspect all of the configuration using
51{{{
52  $ pl-conf -q test@example.com
53  digests.enable = 0
54  digests.maxperiod = 0
55  digests.maxsize = 0
56  list.address = test@example.com
57  ...
58}}}
59(note that not all parameters in this list are actually used yet). To change
60individual parameters from the command line, use
61{{{
62  $ pl-conf -s test@example.com "list.ownername = Alfred E. Newman"
63}}}
64You can also write the whole configuration to a file and work this over
65using your favourite text editor, then reimport the configuration:
66{{{
67  $ pl-conf -q test@example.com >test.conf
68  $ emacs test.conf
69  $ pl-conf -i test@example.com <test.conf
70}}}
71Blank lines and comment lines (starting with ''#'') are ignored when
72a configuration is imported, so feel free to add comments to test.conf --
73you just need to force yourself not to use "pl-conf -s" to change parameters
74behind test.conf's back.
75
76
77== Sending Mail to the List ==
78
79You can now send messages to the new mailing list at test@example.com
80(but for the fact that there are no subscribers to receive them). (As
81a matter of fact, the list won't even accept them until you have
82subscribed ''yourself''.) See the next section.
83
84
85== Managing Subscribers ==
86
87Like most mailing list management programs, Project Lancelot allows users
88to subscribe or unsubscribe themselves by sending messages to
89addresses such as ''test+subscribe@example.com''. But you can still
90change the subscription database manually. Here's how to add subscribers:
91{{{
92  $ pl-subscribe test@example.com joe.blow@example.org sue.foo@example.net
93}}}
94This will add Joe Blow's and Sue Foo's addresses to the subscriber
95database. Project Lancelot uses the same code to parse the address
96arguments to pl-subscribe(1) that it uses to pass ''From'' headers in
97e-mail, so you can say
98{{{
99  $ pl-subscribe test@example.com "Joe Blow <joe.blow@example.org>"
100}}}
101and "Joe Blow" will be noted as the name going with the address,
102''joe.blow@example.org''.
103
104pl-subscribe(1) takes arbitrarily many (well almost)
105addresses on the command line, but if you do not give any, pl-subscribe(1)
106will read its standard input instead:
107{{{
108  $ pl-subscribe test@example.com <members-list.txt
109}}}
110Use pl-list(1) to check who's subscribing:
111{{{
112  $ pl-list test@example.com
113  sue.foo@example.net
114  joe.blow@example.org
115}}}
116If you try to add an address that is already subscribing to the list,
117you will see a nasty message from the database, but the address will
118not be added a second time.
119
120You can remove subscribers again using the pl-unsubscribe(1) command,
121which works essentially like pl-subscribe(1):
122{{{
123  $ pl-unsubscribe test@example.com joe.blow@example.org
124}}}
125
126== List Aliases ==
127
128It is extremely tedious to have to type command lines like
129{{{
130  $ pl-subscribe foobar-announce@lists.marketing.example.com ...
131}}}
132so (fortunately) there is a helpful shortcut. A command like
133{{{
134  $ pl-conf --alias foobar-announce@lists.marketing.example.com fba
135}}}
136lets you use ''fba'' in place of the long address in commands:
137{{{
138  $ pl-subscribe fba ...
139}}}
140This form of "aliasing" applies to all Project Lancelot command-line
141tools. The command
142{{{
143  $ pl-conf --alias foobar-announce@lists.marketing.example.com
144}}}
145(without an alias) will enumerate the current alias (or aliases --
146you can have as many as you like) for that list. If you're ever unsure
147exactly what list an alias points to, use a command like
148{{{
149  $ pl-conf -qh fba list.address
150}}}
151
152Project Lancelot maintains an "automatic" alias to the last list
153address you used in a Project Lancelot command. In
154{{{
155  $ pl-subscribe test@example.org joe.blow@example.org
156  $ pl-subscribe . sue.foo@example.net
157}}}
158the second ''pl-subscribe'' command also applies to
159''test@example.org''. (You will be relieved to hear that this works
160for all Project Lancelot command-line tools except pl-incoming(1),
161which deals with incoming mail, and pl-janitor(1), which performs
162periodic cleanups. These commands will be invoked at various times
163either from the mail system or cron, and it would be confusing for
164them to reset Project Lancelot's notion of the "current list" while
165you may be typing interactive commands.
166
167List aliases are really just symbolic links in the ''.pl'' directory.
168If you want to remove an alias, simply delete the symbolic link in
169question. (The "." alias is really a symbolic link called
170''.default-list''.)
171
172
173== Incoming Mail ==
174
175Here's what happens when Project Lancelot receives a message to the
176list submission address (''test@example.com'', right?). At least this is
177what happens unless you change things completely, which you are
178absolutely free to do but probably shouldn't until you have learned
179more about Project Lancelot's internals.
180
181First of all, Project Lancelot creates a ''workflow'' that governs
182further processing of the message. For mail to the submission address,
183you can look at the value of the lists's '''mail.workflow.submit'''
184parameter in order to see the individual steps. Each step corresponds
185to a Project Lancelot ''processing module'' that does something with
186the message. You can change how a message is processed by deleting or
187inserting processing modules from or into the workflow.
188
189The steps taken for submitted messages include:
190
191 * Optionally checking that the message is indeed addressed to the list.
192 * Optionally checking that the message sender subscribes to the list.
193 * Checking whether the message looks reasonable from a MIME point
194   of view, i.e., has significant plain-text content and does not contain
195   fishy-looking attachments, which might harbour spam or viruses.
196   This step also gets rid of everything that is not plain text.
197 * Adding RFC2919 and (optionally) RFC2369 headers to the message.
198 * Optionally adding a "tag" to the message's ''Subject:'' header.
199 * Adjusting the message's ''Reply-To:'' header if desired (we have heard
200   everything about how this will cause the milk in one's fridge to curdle
201   but we think the feature has its uses even so, so spare us the
202   philosophy).
203 * Sending the message out to the subscribers, optionally only if the
204   sender is an actual list subscriber.
205
206And here is what happens when someone sends mail to a list's subscribe
207address:
208
209 * Project Lancelot checks whether '''subscribe.confirm''' is set for
210   this list.  If so, the prospective subscriber is sent another
211   message containing a ''magic cookie'' -- a long random string that
212   is impossible to guess --, and invited to return that cookie to
213   Project Lancelot. Once Project Lancelot receives this cookie back,
214   the sending address of ''that'' message is added to the subscriber
215   database. This feature is used to keep you safe from practical
216   jokers who enjoy putting your address on 10.000 different mailing
217   lists.
218
219The confirmation mechanism in Project Lancelot is very general and can
220be used to safeguard arbitrary addresses. Project Lancelot uses the
221same code also for unsubscription and configuration requests.
222
223The workflows for the unsubscription, config, owner and help
224addresses are much more boring by far, once you have seen these.
225
226See LancelotModules for more information on Project Lancelot's
227processing modules.
228
229Feel free to come up with new and interesting processing modules that
230do stuff which is not on this list. You may want to check in with the
231Project Lancelot developers' list (see below) to see whether anybody
232else is working on stuff that you have in mind.
233
234
235== Finished ==
236
237This concludes our lightning tour of Project Lancelot. Feel free to
238browse the [http://code.anselms.net/projects/lancelot/ Project
239Lancelot web site], and to send mail to the
240[mailto:lancelot-dev@anselms.net Project Lancelot developers' mailing
241list] giving suggestions, encouragement, and helpful feedback. (As far
242as flames are concerned, you know where you can stick those.)
243
244Project Lancelot is very much a work in progress, and we hope that its
245obvious major problems will very shortly be either removed or replaced
246with new major problems. Stay tuned.
Note: See TracBrowser for help on using the browser.