diff options
Diffstat (limited to 'checkmail')
-rwxr-xr-x | checkmail | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -3,5 +3,14 @@ export DISPLAY=:0 echo "$(date +%Y.%m.%d..%H.%M) $(basename $0)" >> /var/log/ben.cron.log -/usr/bin/offlineimap -/home/ben/me/bin/eml -n + +# Check that we can reach the mail server first +if ping -q -c 1 -W 1 mail.bsima.me >/dev/null +then + msmtp-queue -r # outbox: send an queued mails + offlineimap # download new mails + eml -n # display new email count +else + echo "Could not reach mail server." + exit 1 +fi |