Hi,
this is the second iteration of support for indexing attachment contents
(first version at [1]).

Notable changes:
- patches 1/7 and 3/7 were applied upstream and are thus no longer here
- added tests for the filtering interface (patch 4)
- the tests revealed a hang for empty attachment payload (libnotmuch
  would never close the filter's stdin), which is now fixed
- more environment variables are passed to the filter (filename and
  message ID)
- example filtering program and Firejail profile now live under
  doc/examples, installed by default into
  /usr/share/doc/notmuch/examples
- there is a new example for using Bubblewrap as the sandbox (patch 6)
- the example Python filter has been greatly expanded with:
    - libarchive to descend into archives and compressed files
      (non-recursively, but I seem to have legitimate mails with
      archives within archives, so we may want to allow (limited)
      amounts of recursion)
    - libreoffice to handle various office formats (not entirely
      reliable IME, but better than nothing)
    - mime type guessing using libmagic (when available) and mimetypes
      from Python standard library

[1] id:[email protected]

Cheers,
-- 
Anton Khirnov

---

Anton Khirnov (7):
  Add API for filtering attachments with an external program.
  build: add infrastructure for using close_range()/closefrom()
  index: implement filtering attachments with an external program
  test: add tests for attachment filtering
  doc/examples: add a Firejail profile for sandboxing filtering programs
  doc/examples: add an example Bubblewrap command for sandboxing
    filtering programs
  doc/examples: add an attachment filtering program

 Makefile.local                             |   2 +-
 bindings/python-cffi/notmuch2/_build.py    |   5 +
 bindings/python-cffi/notmuch2/_database.py |  20 ++
 compat/Makefile.local                      |   4 +
 compat/closefrom.c                         |  27 ++
 compat/have_close_range.c                  |   8 +
 compat/have_closefrom.c                    |   8 +
 configure                                  |  38 +++
 debian/rules                               |   1 +
 doc/Makefile.local                         |   8 +-
 doc/examples/bwrap.sh                      |   9 +
 doc/examples/filter.py                     | 273 +++++++++++++++++++
 doc/man1/notmuch-config.rst                |  45 ++++
 lib/config.cc                              |   3 +
 lib/index.cc                               | 299 ++++++++++++++++++++-
 lib/indexopts.c                            |  34 +++
 lib/notmuch.h                              |  23 ++
 test/T590-libconfig.sh                     |   5 +
 test/T681-index-filter.sh                  |  84 ++++++
 19 files changed, 891 insertions(+), 5 deletions(-)
 create mode 100644 compat/closefrom.c
 create mode 100644 compat/have_close_range.c
 create mode 100644 compat/have_closefrom.c
 create mode 100755 doc/examples/bwrap.sh
 create mode 100755 doc/examples/filter.py
 create mode 100755 test/T681-index-filter.sh

-- 
2.47.3

_______________________________________________
notmuch mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to