jaromail

a commandline tool to easily and privately handle your e-mail
git clone git://parazyd.org/jaromail.git
Log | Files | Refs | Submodules | README

commit ee85b3b505cd59bec175a2026dd73f7f3550e5ad
parent 70c948f911c11fd6c55626865453f9ba9b2c846c
Author: Jaromil <jaromil@dyne.org>
Date:   Thu, 24 May 2012 21:08:08 +0200

better backup all mails in folder not just unread

Diffstat:
Msrc/jaro | 15++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/jaro b/src/jaro @@ -870,14 +870,19 @@ backup() { return 1 fi notice "Backup of all read mails older than $expire days" - total=`find $src/cur -type f | wc -l` - moved=`find $src/cur -type f -mtime +$expire | wc -l` - act "from maildir $src ($total in current)" - act "to maildir $dst ($moved to be moved)" + oldread=`find $src/cur -type f | wc -l` + oldunread=`find $src/new -type f | wc -l` + + newread=`find $src/cur -type f -mtime +$expire | wc -l` + newunread=`find $src/new -type f -mtime +$expire | wc -l` + + act "from maildir $src ($oldread read / $oldunread unread)" + act "to maildir $dst ($newread read / $newunread unread)" if [ $DRYRUN = 1 ]; then return 0; fi - find $src/cur -mtime $expire -type f -exec mv {} $dst/cur/ \; + find $src/cur -mtime +$expire -type f -exec mv {} $dst/cur/ \; + find $src/new -mtime +$expire -type f -exec mv {} $dst/new/ \; notice "Operation completed, current maildir sizes:" du -hs $src $dst