From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3C6BA1F55B; Wed, 13 May 2020 21:51:54 +0000 (UTC) Received: from in02.mta.xmission.com ([166.70.13.52]) by out01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYzI8-0007Xj-G3; Wed, 13 May 2020 15:51:52 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1jYzI6-0000iE-0M; Wed, 13 May 2020 15:51:52 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Eric Wong Cc: meta@public-inbox.org References: <87eeyvmx74.fsf@x220.int.ebiederm.org> <20200513193144.GA9299@dcvr> Date: Wed, 13 May 2020 16:48:17 -0500 In-Reply-To: <20200513193144.GA9299@dcvr> (Eric Wong's message of "Wed, 13 May 2020 19:31:44 +0000") Message-ID: <87ftc3mrq6.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1jYzI6-0000iE-0M;;;mid=<87ftc3mrq6.fsf@x220.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX181E7sFGqlGEUE9jTgvB0MVVKeHQSL+gAc= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: I have figured out IMAP IDLE X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) List-Id: Eric Wong writes: > "Eric W. Biederman" wrote: >> >> A few days ago I stumbled upon this magic decoder ring for IMAP. >> The "Ten Commandments of How to Write an IMAP client" >> >> https://www.washington.edu/imap/documentation/commndmt.txt > > That URL already expired, fortunately archive.org has it: > > https://web.archive.org/web/20191029013002/https://www.washington.edu/imap/documentation/commndmt.txt.html Wow. It looks like all of their imap related documentation went away. It looks like wikipedia has the story: https://en.wikipedia.org/wiki/UW_IMAP In short UW_IMAP written by Mark Crispin was the reference IMAP implementation but he died in 2012. So the fact everything stayed up for as long as it did was a bit of testament to it's importance. >> The part I was most clearly missing was that for IMAP it is better to >> open multiple sockets (one per mail folder on the server) than it is to >> switch between folders with the same ssl socket. >> >> The core loop of my imap code now does: > > Is your stuff based on Mail::IMAPClient still working well? Yes. I have fixed a few things to make the code more robust. Which is mostly me learning how Mail::IMAPClient works. I also keep tweaking the ckde to make it more generic/simpler so it has the potential to be usable by someone else. Would be interested if I rebased onto the lastest release and posted my code? Perhaps you could put into contrib until you have something that gets properly tested? > I'm starting to integrate Mail::IMAPClient support into > public-inbox-watch, but not sure how to go about with > automated test cases... > > I guess it's reason to implement a read-only IMAP server along > the lines of public-inbox-nntpd :> That sounds like a pain but it does sound like a good plan. I think there are a lot of people that if there was even a simple IMAP server would find it easier to get started using public-inbox. Eric