# if we're not running under cron or there is a mailserver running
if [ -z "$CRON" ] || kill -0 `pgrep -U $(id -u) -x $MUA` 2>/dev/null; then
# and we can ping the imap host
# if we're not running under cron or there is a mailserver running
if [ -z "$CRON" ] || kill -0 `pgrep -U $(id -u) -x $MUA` 2>/dev/null; then
# and we can ping the imap host
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);'; then
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);'; then