This is an updated version of id:1453561198-2893-1-git-send-email-david@tethera.net The main change is patch 6/6 that uses the config facility to split the database from the mail messages. In order to cut the Gordian knot of how to find the database using config information stored in the database, this uses a well known location (based on XDG_DATA_HOME) to store the database. This is a proof of concept at this point; you can see the basic idea in the last test of T590-libconfig.sh. Some modifications to notmuch-setup / notmuch-config would be needed to make this usable. I haven't tested it very extensively, but in principle at the library level this allows the database and maildir root to be arbitrary paths; if a well known location is not used for the database, then it would be up to the clients to keep track of the database location.