It seems to work, but i'm still waiting for the first run-through.
Downloading messages: 457 of 22831|
This takes ages. I hope it doesn't try to re-download all my messages everytime.
Another thing:
It seems that throughout its run, your script locks the notmuch database. This is particularly
annoying if you want to read/tag mails while waiting for a long sync-process. I think you only
really want to lock the index for a short time in the end.
Do you write to the index directly after a msg is downloaded?