X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=offlineimap-sync;h=ad779a2a48402385335593d0f2ee98a2af80d6b4;hb=165008e5b82c81ebff1061c8f8294c3bc6e9dced;hp=74b23c1ccb8f10c573a5b3cc20192fba45011189;hpb=0b6d44c7f3d567e0a26138509c8a24cb57c69b50;p=distro-setup diff --git a/offlineimap-sync b/offlineimap-sync index 74b23c1..ad779a2 100755 --- a/offlineimap-sync +++ b/offlineimap-sync @@ -3,7 +3,7 @@ set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR # mail-route can get messed up a bit randomly, I don't know why. -#/b/ds/mail-route up | /b/log-quiet/log-once -1 mail-route +#/b/ds/mail-route up |& /b/log-quiet/log-once -1 mail-route for f in $(awk '$1 == "localfolders" {print $NF}' ~/.offlineimaprc); do mkdir -p $f @@ -52,35 +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 -- '{}' + - # 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