4bcd151a37e6dd6e2b262228cc9b94592da79f22
[distro-setup] / fsf-get-mail
1 #!/bin/bash
2
3 # commented, because relying on cronjob
4 #offlineimap -a fsf
5
6 # delete based on http://deflexion.com/2006/05/imap-way-of-deleting-message
7 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
8
9 # mu indexing happens after this, and if offlineimap is running,
10 # it can index messages which are in the wrong folder.
11 # Just run it again if this happens.
12
13 # to test new rules, update fsf-test.sieve, run these commands, then copy new fsf-test.sieve to fsf.sieve
14 # sieve-filter -o mail_location=maildir:/nocow/user/fsfmd:LAYOUT=fs:INBOX=/nocow/user/fsfmd/INBOX ~/sieve/fsf-test.sieve INBOX &>/tmp/testfsfsieve.log
15 # sed -rn '/^Performed actions:/{n;n;p}' /tmp/testfsfsieve.log | sort -u