The notmuch-web package

[Tags: gpl, library]

An email client for the notmuch email indexer (, built using Yesod. This project implements a web server and uses bootstrap and jquery for the UI. The client is fully functional, with searching, viewing, and composing email messages. See for recent changes.

[Skip to ReadMe]


Versions0.1.0,, 0.1.1, 0.1.2,, 0.2.0
Change logNone available
Dependenciesaeson, attoparsec, attoparsec-conduit, base (==4.*), blaze-builder, blaze-html, blaze-markup, bytestring, case-insensitive, conduit, containers, data-default, directory, email-validate, filepath, hamlet, hashable (<= || >, hjsmin, http-conduit, http-types, lifted-base, markdown (>=0.1.5), mime-mail, network, notmuch-web, old-locale, process, process-conduit (>=0.5), pwstore-fast, random, tagsoup, template-haskell, text, text-icu, time, transformers, unordered-containers, vector, wai, wai-extra, warp, xss-sanitize (>=0.3.4), yaml, yesod (==1.2.*), yesod-auth, yesod-static (>=1.2.1 && <1.3) [details]
AuthorJohn Lenz <>
MaintainerJohn Lenz <>
Home page
Source repositoryhead: hg clone
UploadedTue Dec 17 00:12:25 UTC 2013 by JohnLenz
Downloads1161 total (22 in last 30 days)
0 []
StatusDocs available [build log]
Successful builds reported [all 1 reports]




devTurn on development settings, like auto-reload templates.DisabledAutomatic
library-onlyBuild for use with "yesod devel"DisabledAutomatic
no-icuDo not link against libicuDisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainers' corner

For package maintainers and hackage trustees

Readme for notmuch-web-0.2.0

Notmuch Web Client

This project is an email client for notmuch written in Haskell and Yesod. The code implements a web server and uses bootstrap and jquery for the UI. The current features are



To quickly test out the client on linux, make sure you have libgmp and zlib installed, download the latest binary, extract the tarball, then run

$ mv config/settings.example.yml config/settings.yml
$ ./notmuch-web Testing

You can now visit http://localhost:3000 and use "hunter2" as the password.



One nice feature of GHC (the Haskell compiler) is the ability to statically link all the Haskell libraries to not require Haskell to be installed (C libraries are still dynamically linked). I have therefore built the latest release; you can find the tarballs on the download page. The only prerequisites are glibc, libgmp, and zlib. The binaries are missing one feature: use of libicu to decode text/html message parts that have a charset that is not ISO-8859 or UTF-8 (UTF-8 and ISO-8859 are decoded internally without the help of libicu). The reason for this restriction is that libicu is not generally binary compatible between different versions, so I could not link against a version of libicu that worked on many distributions. This restriction will be removed once the next version of notmuch is released (it will include some patches I submitted).

Source, latest released version

To compile the latest release from source, install the Haskell Platform. Next, install notmuch-web from the latest released version on hackage. To do this, from the shell run

$ cabal update
$ cd ~/software/notmuch-build-dir  # Or some path
$ cabal sandbox init               # Requires Cabal 1.18, can be skipped
$ cabal install notmuch-web

The binary will appear at .cabal-sandbox/bin/notmuch-web or ~/.cabal/bin/notmuch-web and the configuration files (see below) are in either .cabal-sandbox/share/notmuch-web-version or ~/.cabal/share/notmuch-web-version depending on if you used a sandbox.

Source, from bitbucket

To compile from bitbucket, install the Haskell Platform and then run "cabal update". Next, clone from bitbucket and within the notmuch-web directory, run cabal sandbox init (if you have Cabal 1.18) and then cabal install --only-dependencies. Next, run "cabal install yesod-bin" (yesod-bin is a development helper binary). You can now run yesod devel to start the development server or use the script to build a tarball.


Although I haven't used it, you might investigate keter for automatic building and deployment. See this blog post and this one for more information.


When launching the notmuch-web binary, it expects several files to be located in one subdirectory of the current directory. No other configuration or install is needed, so you can copy the notmuch-web binary and this folders anywhere, even deploy on computers with no Haskell installed. Note: in versions of notmuch-web before 0.2.0 there was a second folder which can be deleted when you upgrade; see the Changelog.

The required folder is named config and must be in the current directory. The config folder must contain:


notmuch-web has four modes: Development, Testing, Staging, and Production. The mode is specified on the command line when launching notmuch-web. The settings.yml file is split into four sections, one for each mode and notmuch-web will only load settings from the matching section of settings.yml. Using yaml references a collection of default settings are copied into each section of the configuration.

The default settings.yml file is well commented so I won't explain it here. The only required setting that must be edited before notmuch-web will run is "hashed-password", the hash of the password to access (see pwstore for the format). You can generate the hashed password by running "notmuch-web --make-password". Other settings like "from-address" and "approot" should be set as well for proper operation.


To run, execute "notmuch-web Production". This will start the server listening on the configured port. notmuch-web accesses notmuch by launching the "notmuch" binary found in the PATH, so you must make sure the user running notmuch-web has notmuch in the PATH, is able to access the email directory, and has a valid notmuch configuration. You might need to set the NOTMUCH_CONFIG environment variable before launching notmuch-web.

I use a systemd unit to start notmuch-web as my login user at boot, having notmuch-web listen on port 3000. I then run nginx with SSL on port 443, and have nginx reverse proxy to notmuch-web.


Currently, notmuch-web does not implement SSL (although since Yesod/Warp supports SSL we could support it without too much work so it is on the TODO list). Therefore, you will want to reverse-proxy notmuch-web. I use nginx.


When you send a message, notmuch-web sends it using the executable "/usr/sbin/sendmail". If you are not running your own email server, I suggest msmtp. I use msmtp on my laptop, it works great. Just make sure the user you run notmuch-web as has the correct msmtp configuration setup.