]> git.donarmstrong.com Git - bin.git/blobdiff - getmail
add presentation mode hack for volo
[bin.git] / getmail
diff --git a/getmail b/getmail
index 77900af9dcec53629ea10dc6fcef5692c65fcb72..b824fab4e5b13b7643e12c3748c9ab3be4a9cd85 100755 (executable)
--- a/getmail
+++ b/getmail
@@ -14,9 +14,10 @@ fi;
 
 # See if the server exists
 if [ -z "$CRON" ] || kill -0 `pgrep -U $(id -u) -x $MUA` 2>/dev/null; then
-    if ping -q -c 3 $IMAPHOST >/dev/null; then
-       nice -n 19 offlineimap -o -u Noninteractive.Basic 2>/dev/null |grep validity| \
+    if ping -q -c 3 $IMAPHOST >/dev/null 2>&1; then
+       nice -n 19 offlineimap -o -u Noninteractive.Basic 2>&1 |grep validity| \
            perl -ne 'my ($account,$list) = /UID validity problem for folder ([\w-]+)\.([\w-]+)/;
+                      next unless defined $account and length $account;
                       qx(/home/don/bin/deletemailbox -a $account $list > /dev/null);';
     fi;
 fi;