unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Possible addtions to notmuch new ?
@ 2013-08-12  9:34 Vladimir Marek
  2013-08-12 14:34 ` Austin Clements
  2013-08-12 15:53 ` Adam Wolfe Gordon
  0 siblings, 2 replies; 5+ messages in thread
From: Vladimir Marek @ 2013-08-12  9:34 UTC (permalink / raw)
  To: notmuch

Hi,

My mail setup is a directory containing several subdirectories each
subdirectory corresponds to one real mail account I am using. Each mail
account is synchronized differently - I am using offlineimap, fetchmeail
or even synthetically created emails (I am writing very simple jabber<->
mail gate).Every now and then I am running 'notmuch new' to discover new
emails and make them available in my MUA.

That works pretty well, but has some disadvantages too
 - notmuch new takes very long time (30s) during which the notmuch
   database seems to be locked for any other updates from my MUA
 - notmuch new takes long time because it always processes my archive
   dir containing many files. That's mostly un-necessary as typically
   there's no new mail delivered
 - I don't have the possibility of passing new mails through procmail.
   That would be useful for example for changing cron mail subjects,
   putting related automated mails into threads (bugzilla, etc.).


I was thinking that if we could split the new mail discovery from
it's processing, it would solve the disadvantages I'm facing. Something
like

notmuch new --verbose --dry-run [dir] | my_filter | notmuch insert -

It would work
 - --dry-run would not lock and change the database
 - --verbose would print the changes to stdout/stderr. Something like:

new mail/file.1
new mail/file.2
deleted mail/file.3
renamed mail/file.4 mail/file.5
...

[dir] would limit the scope of 'notmuch' new search to dir and it's
subdirectories. Alternatively we could have set of include or exclude
rules similarly to rsync (for example), but [dir] is easier to
implement.

'my_filter' would be my script which could change the contents of emails
before they are inserted into notmuch database.

Notmuch insert would be able to not only add new mails, but also remove
old ones or note that the file was renamed.

How would this sound?

I'm not saying I would implement this, I'm rather curious where would
you like to see notmuch in the future.

Cheers
-- 
	Vlad

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-24  8:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-12  9:34 Possible addtions to notmuch new ? Vladimir Marek
2013-08-12 14:34 ` Austin Clements
2013-08-29 19:41   ` Vladimir Marek
2013-10-24  8:57     ` Vladimir Marek
2013-08-12 15:53 ` Adam Wolfe Gordon

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).