]> Sergey Matveev's repositories - public-inbox.git/blob - script/public-inbox-imapd
multi_git: hoist out common epoch/alternates handling
[public-inbox.git] / script / public-inbox-imapd
1 #!perl -w
2 # Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
4 #
5 # Standalone read-only IMAP server for public-inbox.
6 use strict;
7 use PublicInbox::Daemon;
8 use PublicInbox::IMAPdeflate; # loads PublicInbox::IMAP
9 use PublicInbox::IMAPD;
10 my $imapd = PublicInbox::IMAPD->new;
11 PublicInbox::Daemon::run('0.0.0.0:143',
12         sub { $imapd->refresh_groups(@_) }, # refresh
13         sub ($$$) { PublicInbox::IMAP->new($_[0], $imapd) }, # post_accept
14         $imapd);