Re: [PATCH v3 10/15] crypto: index encrypted parts when indexopts try_decrypt is set.

2017-10-14 Thread David Bremner
Daniel Kahn Gillmor writes: > > "index.auto.decryption" has at least two different meanings at first > blush. For example, it might mean "this message was automatically > decrypted", which isn't necessarily the case. I think in either case you need to document what the

Re: [PATCH v3 10/15] crypto: index encrypted parts when indexopts try_decrypt is set.

2017-10-13 Thread David Bremner
Daniel Kahn Gillmor writes: > > * properties prefixed with "index." are set during indexing and will be >cleared (and possibly re-set) upon reindexing > Fine. I think the model is that "applications" should take ownership of

Re: [PATCH v3 10/15] crypto: index encrypted parts when indexopts try_decrypt is set.

2017-10-13 Thread Daniel Kahn Gillmor
On Thu 2017-10-12 22:08:26 -0300, David Bremner wrote: > The second _notmuch_database_log will override the first > here. You can use _notmuch_database_log_append if you don't want to > clear the existing log (e.g. at least for the second _log > here). good catch, thanks! I'll include that in my

Re: [PATCH v3 10/15] crypto: index encrypted parts when indexopts try_decrypt is set.

2017-10-12 Thread David Bremner
Daniel Kahn Gillmor writes: > + if (status) { > + _notmuch_database_log (notmuch, "Warning: setup failed for > decrypting " > +"during indexing. (%d)\n", status); > + status = notmuch_message_add_property (message,

[PATCH v3 10/15] crypto: index encrypted parts when indexopts try_decrypt is set.

2017-10-09 Thread Daniel Kahn Gillmor
If we see index options that ask us to decrypt when indexing a message, and we encounter an encrypted part, we'll try to descend into it. If we can decrypt, we add the property index-decryption=success. If we can't decrypt (or recognize the encrypted type of mail), we add the property