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>
5 # Standalone read-only IMAP server for public-inbox.
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