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