]> Sergey Matveev's repositories - public-inbox.git/blob - Documentation/public-inbox-config.pod
run update-copyrights from gnulib for 2019
[public-inbox.git] / Documentation / public-inbox-config.pod
1 =head1 NAME
2
3 public-inbox-config - public-inbox config file description
4
5 =head1 SYNOPSIS
6
7 ~/.public-inbox/config
8
9 =head1 DESCRIPTION
10
11 The public-inbox config file is parseable by L<git-config(1)>.
12 This is a global configuration file for mapping/discovering
13 all public-inboxes used by a particular user.
14
15 =head1 CONFIGURATION FILE
16
17 =head2 EXAMPLE
18
19         [publicinbox "test"]
20                 mainrepo = /home/user/path/to/test.git
21                 ; multiple addresses are supported
22                 address = test@example.com
23                 ; address = alternate@example.com
24                 url = http://example.com/test
25                 newsgroup = inbox.test
26
27 =head2 VARIABLES
28
29 =over 8
30
31 =item publicinbox.<name>.address
32
33 The email address of the public-inbox.  May be specified
34 more than once for merging multiple mailing lists (or migrating
35 to new addresses).  This must be specified at least once,
36 the first value will be considered the primary address for
37 informational purposes.
38
39 Default: none, required
40
41 =item publicinbox.<name>.mainrepo
42
43 The absolute path to the directory which hosts the
44 public-inbox.  This must be specified once.
45
46 Default: none, required
47
48 =item publicinbox.<name>.url
49
50 The primary URL for hosting the HTTP/HTTPS archives.
51 Additional HTTP/HTTPS URLs may be specified via
52 C<$GIT_DIR/cloneurl> as documented in L<gitweb(1)>
53
54 Default: none, optional
55
56 =item publicinbox.<name>.newsgroup
57
58 The NNTP group name for use with L<public-inbox-nntpd(8)>.  This
59 may be any newsgroup name with hierarchies delimited by '.'.
60 For example, the newsgroup for L<mailto:meta@public-inbox.org>
61 is: C<inbox.comp.mail.public-inbox.meta>
62
63 Omitting this for the given inbox will prevent the group from
64 being read by L<public-inbox-nntpd(1)>
65
66 Default: none, optional
67
68 =item publicinbox.<name>.watch
69
70 A location for L<public-inbox-watch(1)> to watch.  Currently,
71 only C<maildir:> paths are supported:
72
73         [publicinbox "test"]
74                 watch = maildir:/path/to/maildirs/.INBOX.test/
75
76 Default: none; only for L<public-inbox-watch(1)> users
77
78 =item publicinbox.<name>.watchheader
79
80         [publicinbox "test"]
81                 watchheader = List-Id:<test.example.com>
82
83 Default: none; only for L<public-inbox-watch(1)> users
84
85 =item publicinbox.<name>.nntpmirror
86
87 This may be the full NNTP URL of an independently-run mirror.
88 For example, the https://public-inbox.org/meta/ inbox is
89 mirrored by Gmane at
90 C<nntp://news.gmane.org/gmane.mail.public-inbox.general>
91
92 Default: none
93
94 =item publicinbox.<name>.indexlevel
95
96 The indexing level for L<public-inbox-index(1)>
97
98 C<basic> only requires L<DBD::SQLite(3pm)> and provides all
99 NNTP functionality along with thread-awareness in the WWW
100 interface.
101
102 C<medium> requires L<Search::Xapian(3pm)> to provide full-text
103 term search functionality in the WWW UI.
104
105 C<full> also includes positional information used by Xapian to
106 allow for searching for phrases using quoted text.
107 (e.g. C<"looking for a complete sentence">)
108
109 Default: C<full>
110
111 =item publicinbox.<name>.httpbackendmax
112
113 If a digit, the maximum number of parallel
114 L<git-http-backend(1)> processes to allow for cloning this
115 particular inbox.
116
117 If an alphanumeric value starting with a lowercase alphabetic
118 character is specified, the inbox will use a L</NAMED LIMITER>
119 which can be shared by multiple inboxes.
120
121 Default: 32 (using a default limiter shared by all inboxes)
122
123 =item publicinbox.<name>.coderepo
124
125 The nickname of a "coderepo" section associated with the inbox.
126 May be specified more than once for M:N mapping of code repos to
127 inboxes.  If enabled, diff hunk headers in patch emails will
128 link to the line numbers of blobs.
129
130 Default: none
131
132 =item publicinbox.<name>.replyto
133
134 May be used to control how reply instructions in the PSGI
135 interface are displayed.
136
137 ":none=dead inbox" may be specified to denote an inactive list
138 ("dead inbox" may be replaced with another phrase).
139
140 A list of comma-delimited email addresses may be specified.
141 This can be useful for dedicated inboxes for bot emails, but
142 discussion happens on a seperate mailing list/inbox.
143
144 Mirrors of existing centralized mailing lists may use ":list"
145 here to redirect mail only to the configured inbox address.
146 The use of ":list" is discouraged for new mailing lists, as it
147 leads to centralization.
148
149 Default: :all
150
151 =item publicinbox.css
152
153 The local path name of a CSS file for the PSGI web interface.
154 May contain the attributes "media", "title" and "href" which match
155 the associated attributes of the HTML <style> tag.
156 "href" may be specified to point to the URL of an remote CSS file
157 and the path may be "/dev/null" or any empty file.
158 Multiple files may be specified and will be included in the
159 order specified.
160
161 =item publicinboxmda.spamcheck
162
163 This may be set to C<none> to disable the use of SpamAssassin
164 L<spamc(1)> for filtering spam before it is imported into git
165 history.  Other spam filtering backends may be supported in
166 the future.
167
168 Default: spamc
169
170 =item publicinboxwatch.spamcheck
171
172 This may be set to C<spamc> to enable the use of SpamAssassin
173 L<spamc(1)> for filtering spam before it is imported into git
174 history.  Other spam filtering backends may be supported in
175 the future.
176
177 Default: none
178
179 =item publicinboxwatch.watchspam
180
181 This may be set to C<spamc> to enable the use of SpamAssassin
182 L<spamc(1)> for filtering spam before it is imported into git
183 history.  Other spam filtering backends may be supported in
184 the future.  This requires L<public-inbox-watch(1)>, but affects
185 all configured public-inboxes in PI_CONFIG.
186
187 Default: none
188
189 =item publicinbox.nntpserver
190
191 Set this to point to the address of the L<public-inbox-nntpd(1)>
192 instance.  This is used to advertise the existence of the NNTP
193 presnce in the L<PublicInbox::WWW> HTML interface.
194
195 Multiple values are allowed for servers with multiple
196 addresses or mirrors.
197
198 Default: none
199
200 =item publicinbox.<name>.feedmax
201
202 The size of an Atom feed for the inbox.  If specified more than
203 once, only the last value is used.  Invalid values (<= 0) will
204 be treated as the default value.
205
206 Default: 25
207
208 =item publicinbox.<name>.hide
209
210 A comma-delimited list of listings to hide the inbox from.
211
212 Valid values are currently "www".
213
214 Default: none
215
216 =item coderepo.<nick>.dir
217
218 The path to a git repository for "publicinbox.<name>.coderepo"
219
220 =item coderepo.<nick>.cgitUrl
221
222 The URL of the cgit instance associated with the coderepo.
223
224 Default: none
225
226 =item publicinbox.cgitrc
227
228 A path to a L<cgitrc(5)> file.  "repo.url" directives in the cgitrc
229 will be mapped to the nickname of a coderepo (without trailing slash),
230 and "repo.path" directives map to "coderepo.<nick>.dir".
231 Use of this directive allows admins of existing cgit installations
232 to skip declaring coderepo sections and map inboxes directly to
233 code repositories known to cgit.
234
235 Macro expansion (e.g. C<$HTTP_HOST>) is not yet supported.
236
237 =item publicinbox.cgitbin
238
239 A path to the C<cgit.cgi> executable.  The L<PublicInbox::WWW>
240 interface can spawn cgit as a fallback if the publicinbox.cgitrc
241 directive is configured.
242
243 Default: /var/www/htdocs/cgit/cgit.cgi or /usr/lib/cgit/cgit.cgi
244
245 =item publicinbox.cgitdata
246
247 A path to the data directory used by cgit for storing static files.
248 Typically guessed based the location of C<cgit.cgi> (from
249 C<publicinbox.cgitbin>, but may be overridden.
250
251 Default: basename of C<publicinbox.cgitbin>, /var/www/htdocs/cgit/
252 or /usr/share/cgit/
253
254 =item publicinbox.mailEditor
255
256 See L<public-inbox-edit(1)>
257
258 =item publicinbox.wwwlisting
259
260 Enable a HTML listing style when the root path of the URL '/' is accessed.
261 Valid values are:
262
263 =over 8
264
265 =item * all
266 - Show all inboxes
267
268 =item * 404
269 - Return a 404 page.  This is useful to allow customization with
270 L<Plack::App::Cascade(3pm)>
271
272 =item * match=domain
273 - Only show inboxes with URLs which belong to the domain of the HTTP request
274
275 =for TODO comment
276
277 support showing cgit listing
278
279 =back
280
281 Default: 404
282
283 =back
284
285 =head2 NAMED LIMITER (PSGI)
286
287 Named limiters are useful for preventing large inboxes from
288 monopolizing (or overloading) the server.  Since serving git
289 clones (via L<git-http-backend(1)> can be memory-intensive for
290 large inboxes, it makes sense to put large inboxes on a named
291 limiter with a low max value; while smaller inboxes can use
292 the default limiter.
293
294 C<RLIMIT_*> keys may be set to enforce resource limits for
295 a particular limiter.
296
297 Default named-limiters are prefixed with "-".  Currently,
298 the "-cgit" named limiter is reserved for instances spawning
299 cgit via C<publicinbox.cgitrc>
300
301 =over 8
302
303 =item publicinboxlimiter.<name>.max
304
305 The maximum number of parallel processes for the given limiter.
306
307 =item publicinboxlimiter.<name>.rlimitCore
308
309 =item publicinboxlimiter.<name>.rlimitCPU
310
311 =item publicinboxlimiter.<name>.rlimitData
312
313 The maximum core size, CPU time, or data size processes run with the
314 given limiter will use.  This may be comma-separated to distinguish
315 soft and hard limits.  The word "INFINITY" is accepted as the
316 RLIM_INFINITY constant (if supported by your OS).
317
318 See L<setrlimit(2)> for more info on the behavior of RLIMIT_CORE,
319 RLIMIT_CPU, and RLIMIT_DATA for you operating system.
320
321 =back
322
323 =head3 EXAMPLE WITH NAMED LIMITERS
324
325         ; big inboxes which require lots of memory to clone:
326         [publicinbox "big1"]
327                 mainrepo = /path/to/big1
328                 address = big1@example.com
329                 httpbackendmax = big
330         [publicinbox "big2"]
331                 mainrepo = /path/to/big2
332                 address = big2@example.com
333                 httpbackendmax = big
334
335         ; tiny inboxes which are easily cloned:
336         [publicinbox "tiny1"]
337                 mainrepo = /path/to/tiny1
338                 address = tiny1@example.com
339         [publicinbox "tiny2"]
340                 mainrepo = /path/to/tiny2
341                 address = tiny2@example.com
342
343         [publicinboxlimiter "big"]
344                 max = 4
345
346 In the above example, the "big1" and "big2" are limited to four
347 parallel L<git-http-backend(1)> processes between them.
348
349 However, "tiny1" and "tiny2" will share the default limiter
350 which means there can be 32 L<git-http-backend(1)> processes
351 between them.
352
353 =head1 ENVIRONMENT
354
355 =over 8
356
357 =item PI_CONFIG
358
359 Used to override the default "~/.public-inbox/config" value.
360
361 =back
362
363 =head1 CONTACT
364
365 Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
366
367 The mail archives are hosted at L<https://public-inbox.org/meta/>
368 and L<http://hjrcffqmbrq6wope.onion/meta/>
369
370 =head1 COPYRIGHT
371
372 Copyright 2016-2019 all contributors L<mailto:meta@public-inbox.org>
373
374 License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
375
376 =head1 SEE ALSO
377
378 L<git(1)>, L<git-config(1)>, L<public-inbox-daemon(8)>,
379 L<public-inbox-mda(1)>, L<public-inbox-watch(1)>