notmuch has lots of options, the ability to set up various hooks and filters, and to sync certain IMAP markers with notmuch tags. Here's a ~/.notmuch-config which is roughly like the one I use: [database] path=/home/user/mail [user] name=First Last primary_email=me@domain.com [...