NAME
    public-inbox-watch - mailbox watcher for public-inbox

SYNOPSIS
    public-inbox-watch

    In ~/.public-inbox/config:

            [publicinbox "test"]
                    ; generic public-inbox-config keys:
                    address = test@example.com
                    url = http://example.com/test
                    mainrepo = /path/to/test.example.com.git

                    ; config keys specific to public-inbox-watch:
                    watch = maildir:/path/to/maildirs/.INBOX.test/
                    watchheader = List-Id:<test.example.com>

            [publicinboxwatch]
                    ; optional, enable use of spamc(1) for checking:
                    spamcheck = spamc

                    ; optional, emails marked as read which appear
                    ; here will be trained as spam and deleted from
                    ; the mainrepos of any public-inboxes which are
                    ; configured for watch.
                    ; This is global for all publicinbox.* sections
                    watchspam = maildir:/path/to/maildirs/.INBOX.spam

DESCRIPTION
    public-inbox-watch allows watching a mailbox (currently only Maildir)
    for the arrival of new messages and automatically importing them into a
    public-inbox (git) repository. public-inbox-watch is useful in
    situations when a user wishes to mirror an existing mailing list, but
    has no access to run public-inbox-mda(1) on a server. Unlike
    public-inbox-mda which is invoked once per-message, public-inbox-watch
    is a persistent process, making it faster for after-the-fact imports of
    large Maildirs.

    Upon startup, it scans the mailbox for new messages to be imported while
    it was not running.

    Currently, only Maildirs are supported and the Filesys::Notify::Simple
    Perl module is required.

    For now, IMAP users should use tools such as mbsync(1) or offlineimap(1)
    to bidirectionally sync their IMAP folders to Maildirs for
    public-inbox-watch.

    public-inbox-watch should be run inside a screen(1) session or as a
    systemd(1) service. Errors are emitted to stderr.

OPTIONS
    public-inbox-watch takes no command-line options.

CONFIGURATION
    These configuration knobs should be used in the public-inbox-config(5)

    publicinbox.<name>.watch
    publicinbox.<name>.watchheader
    publicinboxwatch.spamcheck
    publicinboxwatch.watchspam

    See public-inbox-config(5) for documentation on them.

SIGNALS
    SIGHUP  Reload the config file (default: ~/.public-inbox/config)

    SIGUSR1 Rescan all watched mailboxes. This is done automatically after
            startup.

ENVIRONMENT
    PI_CONFIG
            config file. default: ~/.public-inbox/config See
            public-inbox-config(5)

    PERL_INLINE_DIRECTORY
            This may affect any public-inbox processes, but is intended for
            long-lived ones such as "public-inbox-watch" or network daemons.
            See public-inbox-daemon(8).

CONTACT
    Feedback welcome via plain-text mail to <mailto:meta@public-inbox.org>

    The mail archives are hosted at <https://public-inbox.org/meta/> and
    <http://hjrcffqmbrq6wope.onion/meta/>

COPYRIGHT
    Copyright 2016 all contributors <mailto:meta@public-inbox.org>

    License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>

SEE ALSO
    public-inbox-config(5)