[sup-devel] Writing changes back to sources

Scott Henson scott at foolishpride.org
Mon Mar 8 00:45:54 EST 2010

I've been working on getting writing changes back to maildirs.  I've got a
stab that basically re-implements sup-sync-back in its own script, but I'm
not really satisfied with it.  What I would like to be is create a script
that will modify a source with an arbitrary sup expression.  I guess some
examples would be a good way to show what I am talking about.

$ sup-write --drop "is:deleted" maildir:/home/user/Mail/INBOX

This would drop all mail matching the expression "is:deleted" from the INBOX

$ sup-write --archive maildir:/home/user/Mail/Archives "!label:inbox"

This would move all messages from the INBOX to Archives that have been

$ sup-write --store "has:mailist" maildir:/home/user/Mail/Lists

This would find all messages in the Index and write them to the source.

You could put any valid sup expression in the above and have it push the
results out to the requested sources.  You could specify multiple sources to
have it applied across all of them.  My thought is that you would write a
series of scripts to push changes to the index down to the sources.  For
instance, remove all deleted mail and spam, then store labels to their own
sources (good for gmail integration) and finally archive what is left.

To do the above I think we probably need standardize how messages are added
and removed from sources.  The maildir source has store_message and delete.
 I would suppose that we would need to implement something similar for the
other sources (is mbox the only other one left?).  Does this seem to be a
good idea or do we want to continue having different ways of writing back to

Scott Henson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/sup-devel/attachments/20100308/2d44d282/attachment.html>

More information about the Sup-devel mailing list