X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?p=bin.git;a=blobdiff_plain;f=pull-mail;h=a669a29508d9381b7e505908a1513e0f143e72fd;hp=96532507a75b20abd32b04e482bee520131fc7f3;hb=8e8a70c71ec44dbf3347cce0c69652dddb47c586;hpb=8c814ab2a421dc5377b2ddcde4099ec1b1b12d41 diff --git a/pull-mail b/pull-mail index 9653250..a669a29 100755 --- a/pull-mail +++ b/pull-mail @@ -5,20 +5,22 @@ if [ -f ~/.nomail ] && [ "$1" != --force ]; then fi loadavg="$(cut -d. -f1 /proc/loadavg)" -if [ "$loadavg" -ge 5 ]; then +if [ "$loadavg" -ge 5 ] && [ "$1" != --force ]; then # System load is too high. Don't contribute to it. exit 0 fi -bsmtp-pull gluck +bsmtp-pull master hour="$(date +%H)" case $hour in - 0[0-289]|[12]*) + 0[0-4789]|[12]*) date >> ~/.fetchmail/log fetchmail >> ~/.fetchmail/log logrotate -s ~/.fetchmail/logrotate.status ~/.fetchmail/logrotate.conf ;; esac +notmuch new >/dev/null 2>&1 + exit 0