unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: Jacek Generowicz <jacek.generowicz@cern.ch>, notmuch@notmuchmail.org
Subject: Re: notmuch-poll and OfflineIMAP
Date: Tue, 03 Apr 2012 19:32:57 +0300	[thread overview]
Message-ID: <87ty10ai86.fsf@nikula.org> (raw)
In-Reply-To: <aaf33fc5-d266-45d1-9bad-e675fa6a0b84@CERNFE22.cern.ch>

Jacek Generowicz <jacek.generowicz@cern.ch> writes:

> 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?

Offlineimap supports running hooks after syncing. Check if SIGUSR1 does
that too. Then you could run notmuch new in the post sync hook.

Also, notmuch new supports pre-new and post-new hooks. You could start
or SIGUSR1 offlineimap in the pre-new hook. See man notmuch-hooks for
details.


HTH,
Jani.

  reply	other threads:[~2012-04-03 16:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 15:27 notmuch-poll and OfflineIMAP Jacek Generowicz
2012-04-03 16:32 ` Jani Nikula [this message]
2012-04-08 22:20   ` Sebastian Spaeth
2012-04-03 20:48 ` Adam Wolfe Gordon
2012-04-08 22:26   ` Sebastian Spaeth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ty10ai86.fsf@nikula.org \
    --to=jani@nikula.org \
    --cc=jacek.generowicz@cern.ch \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).