[PATCH] lib: Save filenames for files detected as "not an email file" in the database.

Austin Clements amdragon at MIT.EDU
Sat Jan 21 10:13:07 PST 2012


Quoth Tomi Ollila on Jan 21 at 11:48 am:
> On Fri, 20 Jan 2012 17:00:27 -0500, Austin Clements <amdragon at MIT.EDU> wrote:
> > Later runs of "notmuch new" won't scan these files again and won't
> > print warnings.
> > 
> > Various programs (Dovecot, in my case) store indexes and caches and
> > such in the maildir.  Without this, notmuch persistently complains
> > about such files.
> > ---
> 
> LGTM...
> 
> > Every time I run notmuch new I get a slew of these warnings.  It was
> > starting to get on my nerves, so I implemented the solution suggested
> > by the TODO file.
> 
> [ ... ]
> 
> > -large so the detection could be potentially slow). 2. A "notmuch
> > -search" syntax could be added to allow the user to find these files,
> > -(and perhaps delete them or move them away as appropriate).
> > +Add a "notmuch search" syntax to allow uses to find files recorded as
> > +non-emails in the database (and perhaps delete them or move them away
> > +as appropriate).
> 
> Could these messages be tagged with some fixed tag -- we already have
> 'signed' and 'attachment' tag. maybe 'nonemail' (or something) could
> be used for these messages ?

They aren't actually messages.  Messages have a lot of basic metadata
that non-email files don't have, so I went with distinct types of
documents, figuring that would be much less disruptive than having to
deal with message objects that don't support most message methods.
For example, if there were a tag (or any general way to query this),
it's unclear what the output of
 notmuch search --output=summary tag:nonemail
would be.

This isn't necessarily the right approach, but if non-emails *are*
represented as messages, I'm not sure what to do with things like
notmuch_message_get_message_id and notmuch_message_get_thread_id or
how to maintain backwards compatibility for callers that don't expect
queries to return non-emails.


More information about the notmuch mailing list