notmuch-poll and OfflineIMAP

Jacek Generowicz jacek.generowicz at cern.ch
Tue Apr 3 08:27:34 PDT 2012


Hello,

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?

Thanks.


More information about the notmuch mailing list