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

Re: [sup-talk] deleting files from source



On Tue, 19 Oct 2010 02:52:54 +0100, Daniel Hernández <daniel@degu.cl> wrote:

I started using sup recently. Now I have only one source that is a
inbox maildir folder. I want to delete some emails from the source
forever, but when I delete or kill emails they are not really deleted
from the maildir folder. How can I clean the maildir folder, removing
deleted or killed emails?

The design intent of sup is to specifically remove the need to worry about deleting e-mails. But if you really need to do that then one way might be to do the following (assuming your machine has the right tools installed). Doing stuff like this could lose your messages. Info supplied for education purposes only. Proceed at your own risk!

# change to top of the Maildir
  cd ~/Mail
# get message id of all files with tag 'deleted' and put in temp file
  FL=/tmp/del-filelist
  rm -f $FL
for i in `sup-dump | grep deleted | cut -f 1 -d' '`; do grep -l -r $i ./* >> $FL;done
# delete the files in the file list
  for i in `cat $FL`; do rm $i; done
# sync the index. New versions of sup-sync don't have the --changed argument
  sup-sync --verbose --changed

repeat for "killed" instead of "deleted"
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk