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=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 4BA3D1F55B; Fri, 15 May 2020 22:56:44 +0000 (UTC) Date: Fri, 15 May 2020 22:56:44 +0000 From: Eric Wong To: "Eric W. Biederman" Cc: meta@public-inbox.org Subject: Re: [PATCH 2/2] imap_fetch: Add a command to continuously fetch from an imap mailbox Message-ID: <20200515225644.GB4131@dcvr> References: <87eeyvmx74.fsf@x220.int.ebiederm.org> <20200513193144.GA9299@dcvr> <87ftc3mrq6.fsf@x220.int.ebiederm.org> <20200513221715.GA11718@dcvr> <877dxelmsr.fsf@x220.int.ebiederm.org> <87ftc0c3r4.fsf_-_@x220.int.ebiederm.org> <87a728c3p3.fsf_-_@x220.int.ebiederm.org> <87o8qoao09.fsf@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o8qoao09.fsf@x220.int.ebiederm.org> List-Id: "Eric W. Biederman" wrote: > ebiederm@xmission.com (Eric W. Biederman) writes: > > > The command imap_fetch connects to the specified imap mailbox and > > fetches any unfetch messages than waits with imap idle until there are > > more messages to fetch. > > > > By default messages are placed in the specified public inbox mailbox. > > The value of List-ID is consulted and if it is present used to > > select an alternate public-inbox mailbox to place the messages in. > > > > The email messages are placed without modification into the public > > inbox repository so minimize changes of corruption or of loosing > > valuable information. I use the command imap_fetch for all of my > > email and not just a mailling list mirror so I don't want automation > > to accidentally cause something important to be lost. Btw, Email::MIME usage is gone from 1.5.0 due to nasty performance problems and replaced by PublicInbox::Eml. Eml should be completely non-destructive unless somebody sends an abusive message which exceeds the new safety limits; in which case it won't OOM or burn CPU like E::M did. That said, {-public_inbox_raw} still works and Eml looks like a drop-in replacement as far as imap_fetch is concerned. > > No email messages are deleted from the server instead IMAPTracker > > is used to remember which messages were downloaded. Yup. I've integrated IMAPTracker into a local branch, already. I think it could be reused for tracking NNTP fetches, too, since UIDs and NNTP article numbers seem interchangeable. > Bah. I sent this a little too soon. The patch needs this small > incremental fix to actually work. No worries. Btw, any reason you create the SSLSocket yourself instead of passing (Ssl => \@SSL_Socket_options) to IMAPClient->new? Creating and maintaining client-side config options for TLS is another thing that'll need to be done for -watch. I guess we'll steal configuration names/switches from git config/CLI tools to ease the learning curve. I'm already reusing "git credential" for retrieving/storing login information and it seems nice. > Anyway I hope this is enough to help you with your integration of imap > functionality into public-inbox-watch. Yup, thanks again!