X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fsf-get-mail;h=16c8d7e6fc93f096bffda6f1fdbce868ae307068;hb=f0a35267f28e274ef3c2f63ffc20a26ca864e37c;hp=c9b1db0845e553a9175b899850df5eb5d3f637f0;hpb=ebd0ea323de3eacc11e1a624f8cc4f961d8bdb6c;p=distro-setup diff --git a/fsf-get-mail b/fsf-get-mail index c9b1db0..16c8d7e 100755 --- a/fsf-get-mail +++ b/fsf-get-mail @@ -1,3 +1,15 @@ #!/bin/bash -offlineimap -a fsf -sieve-filter -eW -o mail_location=maildir:/nocow/user/fsfmd:LAYOUT=fs:INBOX=/nocow/user/fsfmd/INBOX /a/c/fsf.sieve INBOX &>/tmp/fsfsieve.log + +# commented, because relying on cronjob +#offlineimap -a fsf + +# 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 + +# mu indexing happens after this, it gets files that have been moved +# from the above command. So, trying this out to fix it out. +sleep 0.5 + +# to test new rules, update fsf-test.sieve, run these commands, then copy new fsf-test.sieve to fsf.sieve +# sieve-filter -o mail_location=maildir:/nocow/user/fsfmd:LAYOUT=fs:INBOX=/nocow/user/fsfmd/INBOX ~/sieve/fsf-test.sieve INBOX &>/tmp/testfsfsieve.log +# sed -rn '/^Performed actions:/{n;n;p}' /tmp/testfsfsieve.log | sort -u