X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=offlineimap-sync;h=1c07702868c1888ee84b2988f4253416504ed1a0;hp=3c75258b2b1f328271fac34186e6e40842397020;hb=f95f9128ba77e77d41389810affd475581075246;hpb=092eddeca14a9e0694ce9550abdb663b9e900489 diff --git a/offlineimap-sync b/offlineimap-sync index 3c75258..1c07702 100755 --- a/offlineimap-sync +++ b/offlineimap-sync @@ -52,33 +52,6 @@ if $found_files; then #mu index &>/dev/null ||: fi -# find but ignore directories which dont exist, assuming first args are directories -# and a following arg starts with - -myfind() { - dirs=() - for d; do - if [[ $d == -* ]]; then - # past dirs, onto options - break - fi - shift - if [[ -e $d ]]; then - dirs+=($d) - fi - done - if [[ $dirs ]]; then - find ${dirs[@]} $@ - fi -} - -# qemu-devel is our biggest list by far, so occasionally -# I want to hop into conversations about our mailing -# systems there, but I don't need many old messages. -myfind /nocow/user/fsfmd/l/qemu-devel/new -type f -mtime +14 -execdir rm -- '{}' + -myfind /nocow/user/fsfmd/{sec,Spam,Drafts,{rtcc,sysadmin,l/outreachy-mentors}/new} -type f -mtime +100 -execdir rm -- '{}' + -myfind /nocow/user/fsfmd/log -type f -mtime +300 -execdir rm -- '{}' + -myfind /nocow/user/fsfmd/dmarc -type f -mtime +14 -execdir rm -- '{}' + - # delete based on http://deflexion.com/2006/05/imap-way-of-deleting-message sieve-filter -eW -o mail_location=maildir:/nocow/user/fsfmd:LAYOUT=fs:INBOX=/nocow/user/fsfmd/INBOX ~/sieve/fsf.sieve INBOX delete &>>/tmp/fsfsieve.log