From 90f11ce471c53365a77896c847d0a39b0995b5b5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 10 Jun 2020 07:04:00 +0000 Subject: preliminary imap server implementation 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. --- script/public-inbox-imapd | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 script/public-inbox-imapd (limited to 'script') 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 +# License: AGPL-3.0+ +# +# 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); -- cgit v1.2.3-24-ge0c7