how do you do everyday mail catchup with notmuch? (was: Re: search for date received possible?)

Thomas Jost schnouki at schnouki.net
Tue Oct 25 11:29:06 PDT 2011


On Tue, 25 Oct 2011 19:31:01 +0200, Gregor Zattler <telegraph at gmx.net> wrote:
> With a convectional email setup, emails are filtered in
> one/several folders and one looks in these folders for new emails
> which weren't there last time.  (Especially outlook) users get
> fooled if important emails have for one reason or another a wrong
> date and are therefore not sorted at the end/beginning of their
> emails so they are missed.  Best way to not miss newly arrived
> email for me is to sort them chronologically according to time of
> arrival.
> 
> Is there another solution to this email handling problem which
> works with notmuch (and of which I'm not aware ATM)?
> 
> How do you make sure you don't miss emails while using notmuch?

Here's my setup:

- on my server, mails are sorted with Dovecot sieve module. They are put
  in several folders so that I have something usable when I use my
  webmail (RoundCube) or my phone (with IMAP access).

- on my PC, I run a script every few minutes which does the following:
  - run offlineimap to sync mails between the remote IMAP server and my
    local Maildir
  - run "notmuch new", configured to add the tags "inbox" and "new" to
    the new  messages
  - run an autotag script inspired by [1] but *much* more complex and
    longer... I wrote it in Python, which is faster than running notmuch
    several dozens of times. It only filters mails with the "new" tag,
    and removes this tag after that, so that they are only sorted once.
  - after new mails are tagged, run a "notify" script that displays a
    notification with a list of unread messages (using libnotify, so
    nicely integrated to the desktop).
  - once per day, run "notmuch dump" to a backup dir.

- I then read mails in Emacs, with several saved searches: "tag:unread",
  "tag:inbox", "tag:flagged", "tag:todo", etc. Mails are sorted
  chronologically (oldest first). Using notmuch-search-line-faces, they
  are also displayed in several colors: unread with a specific
  background, "flagged" with another, "tag:todo" with yet another, etc.,
  so that you can spot important messages instantly.

- When I have read a message, I archive it by removing both the "unread"
  and "inbox" tags (I bound that to a single key in notmuch-search and
  notmuch-show). And of course I try to keep the numbers of mails in my
  "inbox" as low as possible :)

The combination of the "inbox", "unread", "flagged" and "todo" tags and
faces works quite well for me. I've been using this setup for several
months without any problem.

You can find my whole mailsync and notify scripts on Github [2], as well
as my Emacs config [3]. However I keep my autotag script private because
there are many email addresses in plaintext there, but if you want I can
send you a copy off-list (or a stripped-down version on the list).

Regards,

[1]: http://notmuchmail.org/initial_tagging/
[2]: https://github.com/Schnouki/dotfiles/tree/master/notmuch
[3]: https://github.com/Schnouki/dotfiles/blob/master/emacs/init-50-mail.el
-- 
Thomas/Schnouki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111025/e7dd5d7f/attachment-0001.pgp>


More information about the notmuch mailing list