Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] Dynamic list of maildir folders as sources
@ 2009-09-03 14:26 Amit Kucheria
  2009-09-03 15:37 ` William Morgan
  0 siblings, 1 reply; 2+ messages in thread
From: Amit Kucheria @ 2009-09-03 14:26 UTC (permalink / raw)


Hi,

I've been watching sup for a while and finally decided to take the plunge
today.  Apologies for the long-winded explanation before the real question,
but I guess if something in my workflow could be optimised, someone might be
able to point it out here.

I'll be running sup on a bunch of maildir folders downloaded via offlineimap.

All my mail comes as IMAP from 3 gmail accounts. When I subscribe to a new
mailing list, I simply create a new filter in gmail to add a new tag to email
from that list and skip the inbox. This shows up as a new maildir folder on my
local machine.

Mutt finds this new folder using the following folder-hook hack I have in my
.muttrc:

folder-hook +foo.* mailboxes `find ~/Mail/foo -type d
-name cur -type d -printf '%h\n' | sort | tr '\012' ' '`

, where foo is one of my mailboxes. So I have ~/Mail/bar and ~/Mail/foobar for
my other accounts. Each of these have several maildir folder in them.

I've run sup-config and it seems to expect that I list every maildir folder
I've got. Is there a way to generate this dynamically?

Regards,
Amit
p.s. sup-sync has been at it on my lkml folder with ~40K mail messages for
30mins now.
-- 
------------------------------------------------------------
Amit Kucheria
------------------------------------------------------------


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

* [sup-talk] Dynamic list of maildir folders as sources
  2009-09-03 14:26 [sup-talk] Dynamic list of maildir folders as sources Amit Kucheria
@ 2009-09-03 15:37 ` William Morgan
  0 siblings, 0 replies; 2+ messages in thread
From: William Morgan @ 2009-09-03 15:37 UTC (permalink / raw)


Reformatted excerpts from Amit Kucheria's message of 2009-09-03:
> I've been watching sup for a while and finally decided to take the
> plunge today.

Welcome!

> I've run sup-config and it seems to expect that I list every maildir
> folder I've got. Is there a way to generate this dynamically?

If you can generate the list (e.g. with the find command you cited), you
can add maildir sources with sup-add directly, instead of having to go
through sup-config.

If you want to automatically detect and add new folders, we could d
something similar in the startup hook. Something like (completely
untested):

  dirs = `find ~/Mail/whatever...`
  dirs.each do |d|
    uri = "maildir:#{d}"
    log "trying #{uri}..."
    unless SourceManager.source_for uri
      source = Maildir.new uri
      SourceManager.add_source source
      log "Added #{uri}"
    end
  end

> p.s. sup-sync has been at it on my lkml folder with ~40K mail messages
> for 30mins now.

Yep, indexing stuff is slow. FWIW, you only have to do it once, and
there are new index backends that are significantly faster. (But still
far from instantaneous.)
-- 
William <wmorgan-sup at masanjin.net>


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

end of thread, other threads:[~2009-09-03 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-03 14:26 [sup-talk] Dynamic list of maildir folders as sources Amit Kucheria
2009-09-03 15:37 ` William Morgan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox