rename .cron to .cron-stage as mcron uses .cron
[james-home.git] / bin / movemail
blob0bea24a4818b194bd756dae4ad9689211b561070
1 #! /bin/sh -e
2 # Gotta be a better way..
3 if [ -e ~/.no-movemail ]; then
4 echo no movemail
5 exit 1
6 fi
7 if [ -e ~/.have-spamc ]; then
8 find /home/james/Maildir/cur /home/james/Maildir/new -type f | while read msg; do
9 procmail < $msg && rm $msg
10 done
12 find /home/james/Maildir/acct-4/INBOX.unfiltered/cur /home/james/Maildir/acct-4/INBOX.unfiltered/new -type f | while read msg; do
13 procmail < $msg && rm $msg
14 done
16 killall offlineimap 2>/dev/null && sleep 5 || true
17 offlineimap