]> Sergey Matveev's repositories - public-inbox.git/blob - lib/PublicInbox/DummyInbox.pm
script/*: set executable bit on -learn and -imapd
[public-inbox.git] / lib / PublicInbox / DummyInbox.pm
1 # Copyright (C) 2020 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
3 #
4 # An EXAMINE-able, PublicInbox::Inbox-like object for IMAP.  Some
5 # IMAP clients don't like having unselectable parent mailboxes,
6 # so we have a dummy
7 package PublicInbox::DummyInbox;
8 use strict;
9
10 sub created_at { 0 } # Msgmap::created_at
11 sub mm { shift }
12 sub uid_range { [] } # Over::uid_range
13 sub subscribe_unlock { undef };
14
15 no warnings 'once';
16 *max = \&created_at;
17 *query_xover = \&uid_range;
18 *over = \&mm;
19 *search = *unsubscribe_unlock =
20         *get_art = *description = *base_url = \&subscribe_unlock;
21
22 1;