diff options
author | Eric Wong <e@yhbt.net> | 2020-06-10 07:04:00 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-06-13 07:55:45 +0000 |
commit | 90f11ce471c53365a77896c847d0a39b0995b5b5 (patch) | |
tree | da22ca9fd8df2a85ed4245812999bd67f0577e49 /script | |
parent | a7018ba43dec712675d21ace5ea1e19d901fdb0f (diff) | |
download | public-inbox-90f11ce471c53365a77896c847d0a39b0995b5b5.tar.gz |
It shares a bit of code with NNTP. It's copy+pasted for now since this provides new ground to experiment with APIs for dealing with slow storage and many inboxes.
Diffstat (limited to 'script')
-rw-r--r-- | script/public-inbox-imapd | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/script/public-inbox-imapd b/script/public-inbox-imapd new file mode 100644 index 00000000..63f865f5 --- /dev/null +++ b/script/public-inbox-imapd @@ -0,0 +1,14 @@ +#!perl -w +# Copyright (C) 2020 all contributors <meta@public-inbox.org> +# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> +# +# Standalone read-only IMAP server for public-inbox. +use strict; +use PublicInbox::Daemon; +use PublicInbox::IMAPdeflate; # loads PublicInbox::IMAP +use PublicInbox::IMAPD; +my $imapd = PublicInbox::IMAPD->new; +PublicInbox::Daemon::run('0.0.0.0:143', + sub { $imapd->refresh_groups }, # refresh + sub ($$$) { PublicInbox::IMAP->new($_[0], $imapd) }, # post_accept + $imapd); |