MSEARCHD(8)

NAME
msearchd - FastCGI mail archive query server

SYNOPSIS
msearchd [-dv] [-j n] [-p path] [-s socket] [-t tmpldir] [-u user] [db]

DESCRIPTION
msearchd is a server which implements the FastCGI Protocol to provide search facilities for the mail archive.

It opens a socket at /var/www/run/msearchd.sock, owned by www:www with permissions 0660. It will then chroot(8) to /var/www and drop privileges to user “www”. Three child processes are ran to handle the incoming traffic on the FastCGI socket. Upon SIGHUP the database is closed and re-opened. The default database used is at /msearchd/mails.sqlite3 inside the chroot.

The options are as follows:

-d  Do not daemonize. If this option is specified, msearchd will run in the foreground and log to standard error.

-j n
    Run n child processes.

-p path
    chroot(2) to path. A path of / effectively disables the chroot.

-s socket
    Create an bind to the local socket at socket.

-t tmpldir
    Path to a directory containing the template files. /etc/smarc by default.

-u user
    Drop privileges to user instead of default user www and chroot(8) to their home directory.

-v  Enable more verbose (debug) logging. Multiple -v options increase the verbosity.

FILES

/etc/smarc/foot.html
    Template with the trailing part of the page.

/etc/smarc/head.html
    Template with the first part of the page. TITLE is replaced with “Search”.

/etc/smarc/search-header.html
    Template for the start of the search page.

/etc/smarc/search.html
    Template for the search form. QUERY is replaced with the search query.

/var/www/msearchd/mails.sqlite3
    Default database.

/var/www/run/msearchd.sock
    UNIX-domain socket.

EXAMPLES
Example configuration for httpd.conf(5):

    server "localhost" {
    	listen on * port 80
    	root "/smarc"
    	gzip-static
    	location "/search" {
    		fastcgi socket "/run/msearchd.sock"
    	}
    }

SEE ALSO
httpd(8)

AUTHORS
Omar Polo <op@openbsd.org>