[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-talk] current state of synching upstream?



Excerpts from Matthias Vallentin's message of Sat Dec 18 14:04:27 -0500 2010:

> The downside appears to be that each rotation adds, in the above
> example, 10 new source entries to sources.yaml and requires
> switching of polling in the non-current sources.

Here's my current approach that I've been happy with since I
implemented it back in the summer:

1. Procmail files all mail (regardless of originating source) into
   Maildirs like .incoming.%Y.%m.  This gives me a new maildir each month
   that holds all incoming mail for that month.  The basics of the
   .procmailrc to do this are:

--snip--

MAILDIR=$HOME/Maildir/
DATEDIR=`date +%Y.%m`

:0
$MAILDIR/.incoming.$DATEDIR/

--snip--

2. I have the following hook setup as after-poll:

--snip--
s = "maildir:/path/to/Maildir/.incoming.#{Date.today.strftime("%Y.%m")}"

unless Redwood::SourceManager.source_for(s)
  Redwood::Logger.force_message "Adding new source: #{s}"
  Redwood::SourceManager.add_source Recoverable.new(Redwood::Maildir.new(s))
end
--snip--

3. I have almost all of my labelling done via the before-add-message
   hook.  This gets me the per-mailing-list tags that I would have
   applied based on source originally.  I almost never apply tags
   manually any more.

The only downside to this is that my sources.yaml file needs manual
twiddling at restart to add the sources that were added during
runtime.  I've yet to be annoyed enough by this to figure out how to
make these dynamic additions sticky across restarts.

HTH.
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk