3 public-inbox-config - public-inbox config file description
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.
15 =head1 CONFIGURATION FILE
20 inboxdir = /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
27 ; backwards compatibility with public-inbox pre-1.2.0,
28 ; "inboxdir" takes precedence over "mainrepo"
29 mainrepo = /home/user/path/to/test.git
35 =item publicinbox.<name>.address
37 The email address of the public-inbox. May be specified
38 more than once for merging multiple mailing lists (or migrating
39 to new addresses). This must be specified at least once,
40 the first value will be considered the primary address for
41 informational purposes.
43 Default: none, required
45 =item publicinbox.<name>.inboxdir
47 The absolute path to the directory which hosts the
48 public-inbox. This must be specified once.
50 This was previously known as "mainrepo", which remains supported,
51 but "inboxdir" takes precedence.
53 Default: none, required
55 =item publicinbox.<name>.url
57 The primary URL for hosting the HTTP/HTTPS archives.
58 Additional HTTP/HTTPS URLs may be specified via
59 C<$GIT_DIR/cloneurl> as documented in L<gitweb(1)>
61 Default: none, optional
63 =item publicinbox.<name>.newsgroup
65 The NNTP group name for use with L<public-inbox-nntpd(8)>. This
66 may be any newsgroup name with hierarchies delimited by C<.>.
67 For example, the newsgroup for L<mailto:meta@public-inbox.org>
68 is: C<inbox.comp.mail.public-inbox.meta>
70 Omitting this for the given inbox will prevent the group from
71 being read by L<public-inbox-nntpd(1)>
73 Default: none, optional
75 =item publicinbox.<name>.watch
77 A location for L<public-inbox-watch(1)> to watch. Currently,
78 only C<maildir:> paths are supported:
81 watch = maildir:/path/to/maildirs/.INBOX.test/
83 Default: none; only for L<public-inbox-watch(1)> users
85 =item publicinbox.<name>.watchheader
88 watchheader = List-Id:<test.example.com>
90 If specified, L<public-inbox-watch(1)> will only process mail
91 matching the given header. If specified multiple times in
92 public-inbox 1.5 or later, mail will be processed if it matches
93 any of the values. Only the last value was used in public-inbox
96 Default: none; only for L<public-inbox-watch(1)> users
98 =item publicinbox.<name>.listid
100 The L<rfc2919|https://tools.ietf.org/html/rfc2919> header without
101 angle brackets for L<public-inbox-mda(1)> deliveries and
102 L<public-inbox-watch(1)>.
104 For public-inbox-watch users, this is a shortcut for specifying
105 C<publicinbox.$NAME.watchheader=List-Id:E<lt>foo.example.comE<gt>>
107 For public-inbox-mda users, this may be used to avoid recipient
108 matching via C<ORIGINAL_RECIPIENT> environment variable.
110 This may be specified multiple times for merging multiple mailing
111 lists into a single public-inbox, only one C<List-Id> header
116 =item publicinbox.<name>.nntpmirror
118 This may be the full NNTP URL of an independently-run mirror.
119 For example, the https://public-inbox.org/meta/ inbox is
121 C<nntp://news.gmane.io/gmane.mail.public-inbox.general>
125 =item publicinbox.<name>.indexlevel
127 The indexing level for L<public-inbox-index(1)>
129 C<basic> only requires L<DBD::SQLite(3pm)> and provides all
130 NNTP functionality along with thread-awareness in the WWW
133 C<medium> requires L<Search::Xapian(3pm)> to provide full-text
134 term search functionality in the WWW UI.
136 C<full> also includes positional information used by Xapian to
137 allow for searching for phrases using quoted text.
138 (e.g. C<"looking for a complete sentence">)
142 =item publicinbox.<name>.indexSequentialShard
144 See L<public-inbox-index(1)/publicInbox.indexSequentialShard>
146 =item publicinbox.<name>.httpbackendmax
148 If a digit, the maximum number of parallel
149 L<git-http-backend(1)> processes to allow for cloning this
152 If an alphanumeric value starting with a lowercase alphabetic
153 character is specified, the inbox will use a L</NAMED LIMITER>
154 which can be shared by multiple inboxes.
156 Default: 32 (using a default limiter shared by all inboxes)
158 =item publicinbox.<name>.coderepo
160 The nickname of a "coderepo" section associated with the inbox.
161 May be specified more than once for M:N mapping of code repos to
162 inboxes. If enabled, diff hunk headers in patch emails will
163 link to the line numbers of blobs.
167 =item publicinbox.<name>.replyto
169 May be used to control how reply instructions in the PSGI
170 interface are displayed.
172 ":none=dead inbox" may be specified to denote an inactive list
173 ("dead inbox" may be replaced with another phrase).
175 A list of comma-delimited email addresses may be specified.
176 This can be useful for dedicated inboxes for bot emails, but
177 discussion happens on a separate mailing list/inbox.
179 Mirrors of existing centralized mailing lists may use ":list"
180 here to redirect mail only to the configured inbox address.
181 The use of ":list" is discouraged for new mailing lists, as it
182 leads to centralization.
186 =item publicinbox.css
188 The local path name of a CSS file for the PSGI web interface.
189 May contain the attributes "media", "title" and "href" which match
190 the associated attributes of the HTML <style> tag.
191 "href" may be specified to point to the URL of an remote CSS file
192 and the path may be "/dev/null" or any empty file.
193 Multiple files may be specified and will be included in the
196 =item publicinboxmda.spamcheck
198 This may be set to C<none> to disable the use of SpamAssassin
199 L<spamc(1)> for filtering spam before it is imported into git
200 history. Other spam filtering backends may be supported in
205 =item publicinboxwatch.spamcheck
207 This may be set to C<spamc> to enable the use of SpamAssassin
208 L<spamc(1)> for filtering spam before it is imported into git
209 history. Other spam filtering backends may be supported in
212 This requires L<public-inbox-watch(1)>, but affects all configured
213 public-inboxes in PI_CONFIG.
217 =item publicinboxwatch.watchspam
219 A Maildir to watch for confirmed spam messages to appear in.
220 Messages which appear in this folder with the (S)een Maildir flag
221 will be hidden from all configured inboxes based on Message-ID
222 and content matching.
224 Messages without the (S)een Maildir flag are not considered for hiding.
226 Default: none; only for L<public-inbox-watch(1)> users
228 =item publicinbox.nntpserver
230 Set this to point to the hostname of the L<public-inbox-nntpd(1)>
231 instance. This is used to advertise the existence of the NNTP
232 endpoint in the L<PublicInbox::WWW> HTML interface.
234 Multiple values are allowed for instances with multiple hostnames
239 =item publicinbox.<name>.feedmax
241 The size of an Atom feed for the inbox. If specified more than
242 once, only the last value is used. Invalid values (<= 0) will
243 be treated as the default value.
247 =item publicinbox.<name>.hide
249 A comma-delimited list of listings to hide the inbox from.
251 Valid values are currently C<www> and C<manifest>.
255 =item coderepo.<nick>.dir
257 The path to a git repository for "publicinbox.<name>.coderepo"
259 =item coderepo.<nick>.cgitUrl
261 The URL of the cgit instance associated with the coderepo.
265 =item publicinbox.cgitrc
267 A path to a L<cgitrc(5)> file. "repo.url" directives in the cgitrc
268 will be mapped to the nickname of a coderepo (without trailing slash),
269 and "repo.path" directives map to "coderepo.<nick>.dir".
270 Use of this directive allows admins of existing cgit installations
271 to skip declaring coderepo sections and map inboxes directly to
272 code repositories known to cgit.
274 Macro expansion (e.g. C<$HTTP_HOST>) is not yet supported.
276 =item publicinbox.cgitbin
278 A path to the C<cgit.cgi> executable. The L<PublicInbox::WWW>
279 interface can spawn cgit as a fallback if the publicinbox.cgitrc
280 directive is configured.
282 Default: /var/www/htdocs/cgit/cgit.cgi or /usr/lib/cgit/cgit.cgi
284 =item publicinbox.cgitdata
286 A path to the data directory used by cgit for storing static files.
287 Typically guessed based the location of C<cgit.cgi> (from
288 C<publicinbox.cgitbin>, but may be overridden.
290 Default: basename of C<publicinbox.cgitbin>, /var/www/htdocs/cgit/
293 =item publicinbox.mailEditor
295 See L<public-inbox-edit(1)>
297 =item publicinbox.indexMaxSize
298 =item publicinbox.indexBatchSize
299 =item publicinbox.indexSequentialShard
301 See L<public-inbox-index(1)>
303 =item publicinbox.wwwlisting
305 Enable a HTML listing style when the root path of the URL '/' is accessed.
314 - Return a 404 page. This is useful to allow customization with
315 L<Plack::App::Cascade(3pm)>
318 - Only show inboxes with URLs which belong to the domain of the HTTP request
322 support showing cgit listing
328 =item publicinbox.grokmanifest
330 Controls the generation of a grokmirror-compatible gzipped JSON file
331 at the top-level of the PSGI interface. You generally do not need to
332 change this from the default.
339 - Only include inboxes with URLs which belong to the domain of
340 the HTTP request. This is compatible with virtual hosting where
341 several domains come from the same host.
344 - All inboxes are present in C<manifest.js.gz>, regardless of domain.
345 Only use this if you're serving HTTP requests in a domain-agnostic manner.
348 - C<manifest.js.gz> will only contain an empty JSON array.
349 This does NOT affect C<$INBOX_URL/manifest.js.gz>, which will
350 always contain all git repos used by the inbox at C<$INBOX_URL>
354 Default: C<match=domain>
358 =head2 NAMED LIMITER (PSGI)
360 Named limiters are useful for preventing large inboxes from
361 monopolizing (or overloading) the server. Since serving git
362 clones (via L<git-http-backend(1)> can be memory-intensive for
363 large inboxes, it makes sense to put large inboxes on a named
364 limiter with a low max value; while smaller inboxes can use
367 C<RLIMIT_*> keys may be set to enforce resource limits for
368 a particular limiter.
370 Default named-limiters are prefixed with "-". Currently,
371 the "-cgit" named limiter is reserved for instances spawning
372 cgit via C<publicinbox.cgitrc>
376 =item publicinboxlimiter.<name>.max
378 The maximum number of parallel processes for the given limiter.
380 =item publicinboxlimiter.<name>.rlimitCore
382 =item publicinboxlimiter.<name>.rlimitCPU
384 =item publicinboxlimiter.<name>.rlimitData
386 The maximum core size, CPU time, or data size processes run with the
387 given limiter will use. This may be comma-separated to distinguish
388 soft and hard limits. The word "INFINITY" is accepted as the
389 RLIM_INFINITY constant (if supported by your OS).
391 See L<setrlimit(2)> for more info on the behavior of RLIMIT_CORE,
392 RLIMIT_CPU, and RLIMIT_DATA for you operating system.
396 =head3 EXAMPLE WITH NAMED LIMITERS
398 ; big inboxes which require lots of memory to clone:
400 inboxdir = /path/to/big1
401 address = big1@example.com
404 inboxdir = /path/to/big2
405 address = big2@example.com
408 ; tiny inboxes which are easily cloned:
409 [publicinbox "tiny1"]
410 inboxdir = /path/to/tiny1
411 address = tiny1@example.com
412 [publicinbox "tiny2"]
413 inboxdir = /path/to/tiny2
414 address = tiny2@example.com
416 [publicinboxlimiter "big"]
419 In the above example, the "big1" and "big2" are limited to four
420 parallel L<git-http-backend(1)> processes between them.
422 However, "tiny1" and "tiny2" will share the default limiter
423 which means there can be 32 L<git-http-backend(1)> processes
432 Used to override the default "~/.public-inbox/config" value.
438 Feedback welcome via plain-text mail to L<mailto:meta@public-inbox.org>
440 The mail archives are hosted at L<https://public-inbox.org/meta/>
441 and L<http://hjrcffqmbrq6wope.onion/meta/>
445 Copyright 2016-2020 all contributors L<mailto:meta@public-inbox.org>
447 License: AGPL-3.0+ L<https://www.gnu.org/licenses/agpl-3.0.txt>
451 L<git(1)>, L<git-config(1)>, L<public-inbox-daemon(8)>,
452 L<public-inbox-mda(1)>, L<public-inbox-watch(1)>,
453 L<grokmirror|https://git.kernel.org/pub/scm/utils/grokmirror/grokmirror.git>