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-ASN: AS6315 166.70.0.0/16 X-Spam-Status: No, score=-3.4 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-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 620581F4BD; Wed, 9 Oct 2019 07:59:34 +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.87) (envelope-from ) id 1iI6sd-0007FS-Gq; Wed, 09 Oct 2019 01:59:31 -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 1iI6sc-0004Vb-Jc; Wed, 09 Oct 2019 01:59:31 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Eric Wong Cc: Alyssa Ross , meta@public-inbox.org References: <87imp05hlm.fsf@alyssa.is> <20191008001050.rwd7bh7cek7qrydi@dcvr> <87wodfctwd.fsf@x220.int.ebiederm.org> <20191008221108.3wsso25kviiwd7ek@dcvr> <87wodec1um.fsf@x220.int.ebiederm.org> <20191008224104.GA24142@dcvr> Date: Wed, 09 Oct 2019 02:58:45 -0500 In-Reply-To: <20191008224104.GA24142@dcvr> (Eric Wong's message of "Tue, 8 Oct 2019 22:41:04 +0000") Message-ID: <87h84ibb9m.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=1iI6sc-0004Vb-Jc;;;mid=<87h84ibb9m.fsf@x220.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+8r3HbvqrtMKObc8mSOLUcu7okm7nTOX4= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: Do I need multiple publicinbox..address values? 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: >> my $tracker = PublicInbox::IMAPTracker->new(); > > Thanks. What's PublicInbox::IMAPTracker? Something that keeps the last fetched UID in an sqlite database. I will follow up with a patch for that as well. I haven't been brave enough to let this script delete any mail yet so I need to track what has been fetched. Something that will be rolled back if the email message isn't commited into git. I have a companion script that will delete mail. I mostly sent it so that there is some idea what I am working with. In context of this discussion I don't remember how often I am looking at the "Delivered-To:" header. That is almost gone but I know for a while I was using that as well. >> for (;;imap_sleep()) { >> # Run fetch_mail in it's own separate process so >> # that if something goes wrong the process exits >> # and everything cleans up properly. >> # >> # Running fetch_mail in an eval block is not enough >> # to prevent leaks of locks and other resources. > > I was thinking along the same lines :) > > The rest looked good and it's definitely something I can work > with to get supportable in a way that reuses git's credential > system and configs. I think fundamentally the script sucks because it is one email message at a time (not using IMAPs overlapping), the script is polling (NOT using IMAP idle), and I have magic to go from the server that I need to fetch to the actual domain. But in practice the script seems to be working reliably even in the event of an error right now. Eric