Blob


1 .\" This file is in the public domain.
2 .Dd April 4, 2023
3 .Dt MSEARCHD 8
4 .Os
5 .Sh NAME
6 .Nm msearchd
7 .Nd FastCGI mail archive query server
8 .Sh SYNOPSIS
9 .Nm
10 .Op Fl dv
11 .Op Fl j Ar n
12 .Op Fl p Ar path
13 .Op Fl s Ar socket
14 .Op Fl u Ar user
15 .Op Ar db
16 .Sh DESCRIPTION
17 .Nm
18 is a server which implements the FastCGI Protocol to provide search
19 facilities for the mail archive.
20 .Pp
21 It opens a socket at
22 .Pa /var/www/run/msearchd.sock ,
23 owned by www:www with permissions 0660.
24 It will then
25 .Xr chroot 8
26 to
27 .Pa /var/www
28 and drop privileges to user
29 .Dq www .
30 Three child processes are ran to handle the incoming traffic on the
31 FastCGI socket.
32 Upon
33 .Dv SIGHUP
34 the database is closed and re-opened.
35 The default database used is at
36 .Pa /msearchd/mails.sqlite3
37 inside the chroot.
38 .Pp
39 The options are as follows:
40 .Bl -tag -width Ds
41 .It Fl d
42 Do not daemonize.
43 If this option is specified,
44 .Nm
45 will run in the foreground and log to standard error.
46 .It Fl j Ar n
47 Run
48 .Ar n
49 child processes.
50 .It Fl p Ar path
51 .Xr chroot 2
52 to
53 .Ar path .
54 A
55 .Ar path
56 of
57 .Pa /
58 effectively disables the chroot.
59 .It Fl s Ar socket
60 Create an bind to the local socket at
61 .Ar socket .
62 .It Fl u Ar user
63 Drop privileges to
64 .Ar user
65 instead of default user www and
66 .Xr chroot 8
67 to their home directory.
68 .It Fl v
69 Enable more verbose (debug) logging.
70 Multiple
71 .Fl v
72 options increase the verbosity.
73 .El
74 .Sh FILES
75 .Bl -tag -width /var/www/msearchd/mails.sqlite3 -compact
76 .It Pa /var/www/msearchd/mails.sqite3
77 Default database.
78 .It Pa /var/www/run/msearchd.sock
79 .Ux Ns -domain socket.
80 .El
81 .Sh EXAMPLES
82 Example configuration for
83 .Xr httpd.conf 5 :
84 .Bd -literal -offset -indent
85 server "localhost" {
86 listen on * port 80
87 root "/marc"
88 location "/search" {
89 fastcgi socket "/run/msearchd.sock"
90 }
91 }
92 .Ed
93 .Sh SEE ALSO
94 .Xr httpd 8
95 .Sh AUTHORS
96 .An Omar Polo Aq Mt op@openbsd.org