Blame


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