notmuch-poll and OfflineIMAP
Adam Wolfe Gordon
awg+notmuch at xvx.ca
Tue Apr 3 13:48:18 PDT 2012
Hi Jacek,
On Tue, Apr 3, 2012 at 09:27, Jacek Generowicz <jacek.generowicz at cern.ch> wrote:
> Would you have any advice on how to construct a notmuch-poll script
> that would work well in concert with OfflineIMAP? In 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
>
> kill -SIGUSR1 `cat ~/.offlineimap/pid`
>
> or
>
> pkill -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.
More information about the notmuch
mailing list