Hi,
this is the third iteration (labeled v4 since some patches got a v3 in
the previous thread [1]) of my patchset adding support for indexing
attachment contents.

Notable changes since previous thread:
- since multiple people questioned always passing the filter string to
  the shell, I'm not doing that anymore; instead, I'm using
  g_shell_parse_argv() that parsers the filter command "in a shell-like
  way", but without actually invoking the shell; hopefully that
  satisfies everyone
- at Tomi's suggestion, I'm also using g_spawn_async_with_pipes_and_fds()
  rather than fork()+execve(); this shortens the code somewhat and
  removes the need for previous patch 2/7 (close_range()/closefrom());
- the example filtering program has been improved further:
    - logging (enabled with -v)
    - handling for application/mbox and message/rfc822 payloads
    - archive and email message processing is now recursive, up to the
      user-configurable depth (default is 8), so you can have an archive
      of emails which themselves contain archives as attachments;
- all of David's review comments should be addressed

[1] id:[email protected]

Cheers,
-- 
Anton Khirnov

---

Anton Khirnov (6):
  Add API for filtering attachments with an external program.
  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 |  21 ++
 configure                                  |   6 +
 debian/rules                               |   1 +
 doc/Makefile.local                         |  10 +-
 doc/examples/bwrap.sh                      |   9 +
 doc/examples/filter.py                     | 384 +++++++++++++++++++++
 doc/man1/notmuch-config.rst                |  45 +++
 lib/config.cc                              |   3 +
 lib/index.cc                               | 313 +++++++++++++++--
 lib/indexopts.c                            |  34 ++
 lib/notmuch.h                              |  23 ++
 test/T590-libconfig.sh                     |   5 +
 test/T681-index-filter.sh                  |  84 +++++
 15 files changed, 923 insertions(+), 22 deletions(-)
 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