]> Sergey Matveev's repositories - public-inbox.git/blob - INSTALL
lei q: reduce lei/store work for kw changes to stored mail
[public-inbox.git] / INSTALL
1 public-inbox (server-side) installation
2 ---------------------------------------
3
4 This is for folks who want to setup their own public-inbox instance.
5 Clients should use normal git-clone/git-fetch, IMAP or NNTP clients
6 if they want to import mail into their personal inboxes.
7
8 public-inbox is developed on Debian GNU/Linux systems and will
9 never depend on packages outside of the "main" component of
10 the "stable" distribution, currently Debian 10.x ("buster"),
11 but older versions of Debian remain supported.
12
13 Most packages are available in other GNU/Linux distributions
14 and FreeBSD.
15
16 TODO: this still needs to be documented better,
17 also see the scripts/ and sa_config/ directories in the source tree
18
19 Requirements
20 ------------
21
22 public-inbox requires a number of other packages to access its full
23 functionality.  The core tools are, of course:
24
25 * Git (1.8.0+, 2.6+ for writing v2 inboxes)
26 * Perl 5.10.1+
27 * DBD::SQLite (needed for IMAP, NNTP, message threading, and v2 inboxes)
28
29 To accept incoming mail into a public inbox, you'll likely want:
30
31 * MTA - postfix is recommended (for public-inbox-mda)
32 * SpamAssassin (spamc/spamd)   (for public-inbox-watch/public-inbox-mda)
33
34 Beyond that, there is one non-standard Perl module required:
35
36 * URI::Escape                      deb: liburi-perl
37                                    pkg: p5-URI
38                                    rpm: perl-URI
39                                    (for HTML/Atom generation)
40
41 Plack and Date::Parse are optional as of public-inbox v1.3.0,
42 but required for older releases:
43
44 * Plack                            deb: libplack-perl
45                                    pkg: p5-Plack
46                                    rpm: perl-Plack, perl-Plack-Test,
47                                    (for HTML/Atom generation)
48
49 - Date::Parse                      deb: libtimedate-perl
50                                    pkg: p5-TimeDate
51                                    rpm: perl-TimeDate
52                                    (for broken, mostly historical emails)
53
54 Where "deb" indicates package names for Debian-derived distributions,
55 "pkg" is for the FreeBSD package (maybe other common BSDs, too), and
56 "rpm" is for RPM-based distributions (only known to work on Fedora).
57
58 Numerous optional modules are likely to be useful as well:
59
60 - DBD::SQLite                      deb: libdbd-sqlite3-perl
61                                    pkg: p5-DBD-SQLite
62                                    rpm: perl-DBD-SQLite
63                                    (for v2, IMAP, NNTP, or gzipped mboxes)
64
65 - Search::Xapian or Xapian(.pm)    deb: libsearch-xapian-perl
66                                    pkg: p5-Search-Xapian OR p5-Xapian
67                                    rpm: perl-Search-Xapian
68                                    (HTTP and IMAP search)
69
70 - Net::Server                      deb: libnet-server-perl
71                                    pkg: pkg-Net-Server
72                                    rpm: perl-Net-Server
73                                    (for HTTP/IMAP/NNTP background daemons,
74                                     not needed as systemd services or
75                                     foreground servers)
76
77 - Inline::C                        deb: libinline-c-perl
78                                    pkg: pkg-Inline-C
79                                    rpm: perl-Inline (or perl-Inline-C)
80                                    (speeds up process spawning on Linux,
81                                     see public-inbox-daemon(8))
82
83 - Email::Address::XS               deb: libemail-address-xs-perl
84                                    pkg: pkg-Email-Address-XS
85                                    (correct parsing of tricky email
86                                     addresses, phrases and comments,
87                                     required for IMAP)
88
89 - Parse::RecDescent                deb: libparse-recdescent-perl
90                                    pkg: p5-Parse-RecDescent
91                                    rpm: perl-ParseRecDescent
92                                    (optional, for public-inbox-imapd(1))
93
94 - BSD::Resource                    deb: libbsd-resource-perl
95                                    pkg: p5-BSD-Resource
96                                    rpm: perl-BSD-Resource
97                                    (optional, for PSGI limiters
98                                     see public-inbox-config(5))
99
100 - Plack::Middleware::ReverseProxy  deb: libplack-middleware-reverseproxy-perl
101                                    pkg: p5-Plack-Middleware-ReverseProxy
102                                    rpm: perl-Plack-Middleware-ReverseProxy
103                                    (ensures redirects are correct when running
104                                     behind nginx or Varnish)
105
106 * highlight                        deb: libhighlight-perl
107                                    (for syntax highlighting with coderepo)
108
109 * xapian-compact (tool)            deb: xapian-tools
110                                    pkg: xapian-core
111                                    rpm: xapian-core
112                                    (optional, for public-inbox-compact(1))
113
114 - Linux::Inotify2                  deb: liblinux-inotify2-perl
115                                    rpm: perl-Linux-Inotify2
116                                    (for public-inbox-watch and -imapd on Linux)
117
118 The following module is typically pulled in by dependencies listed
119 above, so there is no need to explicitly install them:
120
121 - DBI                              deb: libdbi-perl
122                                    pkg: p5-DBI
123                                    rpm: perl-DBI
124                                    (pulled in by DBD::SQLite)
125
126 Uncommonly needed modules (see HACKING for development-only modules):
127
128 - Socket6                          deb: libsocket6-perl
129                                    pkg: p5-Socket6
130                                    rpm: perl-Socket6
131                                    (pulled in by SpamAssassin and Net::Server,
132                                     only necessary if using IPv6 with
133                                     Plack::Middleware::AccessLog or similar
134                                     on Perl <= 5.12)
135
136 - Crypt::CBC                       deb: libcrypt-cbc-perl
137                                    pkg: p5-Crypt-CBC
138                                    (for PublicInbox::Unsubscribe (rarely used))
139
140 standard MakeMaker installation (Perl)
141 --------------------------------------
142
143 To use MakeMaker, you need to ensure ExtUtils::MakeMaker is available.
144 This is typically installed with Perl, but RPM-based systems will likely
145 need to install the `perl-ExtUtils-MakeMaker' package.
146
147 Once the dependencies are installed, you should be able to build and
148 install the system (into /usr/local) with:
149
150         perl Makefile.PL
151         make
152         make test    # see HACKING for faster tests for hackers
153         make install # root permissions may be needed
154
155 When installing Search::Xapian, make sure the underlying Xapian
156 installation is not affected by an index corruption bug:
157
158         https://bugs.debian.org/808610
159
160 For Debian 8.x (jessie), this means using Debian 8.5 or later.
161
162 public-inbox will never store unregeneratable data in Xapian
163 or any other search database we might use; Xapian corruption
164 will not destroy critical data.
165
166 See the public-inbox-overview(7) man page for the next steps once
167 the installation is complete.
168
169 The following required packages are part of the Perl standard
170 library.  Debian-based distros put them in "libperl5.$MINOR" or
171 "perl-modules-5.$MINOR"; and FreeBSD puts them in "perl5".
172 RPM-based distros split them out into separate packages:
173
174 * Digest::SHA                      rpm: perl-Digest-SHA
175 * Data::Dumper                     rpm: perl-Data-Dumper
176 * Encode                           rpm: perl-Encode
177 * IO::Compress                     rpm: perl-IO-Compress
178 * Storable                         rpm: perl-Storable
179 * Text::ParseWords                 rpm: perl-Text-Parsewords
180
181 Copyright
182 ---------
183
184 Copyright 2013-2021 all contributors <meta@public-inbox.org>
185 License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>