--- /dev/null
+Return-Path: <awg@xvx.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 5D6CF431FB6\r
+ for <notmuch@notmuchmail.org>; Tue, 3 Apr 2012 13:48:24 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id FHb-vsH2AmVT for <notmuch@notmuchmail.org>;\r
+ Tue, 3 Apr 2012 13:48:22 -0700 (PDT)\r
+Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
+ [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id EFAD9431FAE\r
+ for <notmuch@notmuchmail.org>; Tue, 3 Apr 2012 13:48:21 -0700 (PDT)\r
+Received: by bkwj4 with SMTP id j4so141615bkw.26\r
+ for <notmuch@notmuchmail.org>; Tue, 03 Apr 2012 13:48:19 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=mime-version:sender:x-originating-ip:in-reply-to:references:date\r
+ :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
+ :content-transfer-encoding:x-gm-message-state;\r
+ bh=So6yYxWiiQHrgydMirKEYndRN7ulNkMnbEM3+q73P44=;\r
+ b=Vos6VhI/iRO3EK9Mk7kuvVHBcYZEjROrhQ9PFpEWGfuCZRDpWz5k/Sz+iZRDDfH0ev\r
+ RWfPWhwvI6HrViFEZ9UkJN+HcDrDTRgbcLyVwpr6Og1wZv8z/zwDClW93bKctKv8C3TD\r
+ aQHhDHFk7oTYAWWNg0Coe76NmME9kPNc0BdeshQAdA1c5KSrMpZ2y+GEoRRtgxiD6y29\r
+ KlPGaR6R0L8GabrOa0hzh3i6P8EHopB7NJ3K3K/WVking2x1pwL7PJ6iwFO2zQItjctd\r
+ 2XRepTOHTcV6szkvcHnzseirhK4Av25cUegp+MssGwturH3Z8IYjpzjctpkGGGBCBXx7\r
+ bIUA==\r
+MIME-Version: 1.0\r
+Received: by 10.152.129.137 with SMTP id nw9mr15662726lab.48.1333486099028;\r
+ Tue, 03 Apr 2012 13:48:19 -0700 (PDT)\r
+Sender: awg@xvx.ca\r
+Received: by 10.112.97.14 with HTTP; Tue, 3 Apr 2012 13:48:18 -0700 (PDT)\r
+X-Originating-IP: [128.221.197.57]\r
+In-Reply-To: <aaf33fc5-d266-45d1-9bad-e675fa6a0b84@CERNFE22.cern.ch>\r
+References: <aaf33fc5-d266-45d1-9bad-e675fa6a0b84@CERNFE22.cern.ch>\r
+Date: Tue, 3 Apr 2012 14:48:18 -0600\r
+X-Google-Sender-Auth: 9tCTHxS71It2AAWNNZ6qQEwIBrE\r
+Message-ID:\r
+ <CAMoJFUtoZyFFBx8uZMHDTgvCtYzzsi7ggQ-6a3ewp2KbDgB8ww@mail.gmail.com>\r
+Subject: Re: notmuch-poll and OfflineIMAP\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: Jacek Generowicz <jacek.generowicz@cern.ch>\r
+Content-Type: text/plain; charset=ISO-8859-1\r
+Content-Transfer-Encoding: quoted-printable\r
+X-Gm-Message-State:\r
+ ALoCoQmdVzTH7kSRKGRijd4auoRptrm38bBNesuE901o/Zgkf/wdo7Z0+XFJqmsdimmJF8ggREuy\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 03 Apr 2012 20:48:24 -0000\r
+\r
+Hi Jacek,\r
+\r
+On Tue, Apr 3, 2012 at 09:27, Jacek Generowicz <jacek.generowicz@cern.ch> w=\r
+rote:\r
+> Would you have any advice on how to construct a notmuch-poll script\r
+> that would work well in concert with OfflineIMAP? =A0In particlular, how\r
+> can you avoid having to re-issue the IMAP account passwords?\r
+>\r
+> The OfflineIMAP docs state that SIGUSR1 forces an immediate resync of\r
+> all accounts, so something based around\r
+>\r
+> =A0 =A0kill -SIGUSR1 `cat ~/.offlineimap/pid`\r
+>\r
+> or\r
+>\r
+> =A0 =A0pkill -SIGUSR1 -u `whoami` offlineimap\r
+>\r
+> (with an already-running OfflineIMAP process in autorefresh mode)\r
+> could work, but it's not clear to me how to discover when the resync\r
+> is done, and sleeping for an arbitrary time before calling 'notmuch\r
+> new' seems unsatisfactory.\r
+>\r
+> Any words of wisdom?\r
+\r
+I run offlineimap in autorefresh mode (with IDLE too, actually) and\r
+use a script based on inotify to update notmuch whenever new mail\r
+comes in: https://gist.github.com/1952483 . It sounds like some\r
+variant of this would probably work for you.\r
+\r
+As an added bonus, I have my post-new script run emacsclient -n -e\r
+'(notmuch-hello-update t)', so if I flip to my mail desktop I can see\r
+right away if there's new mail.\r