Your web-browser does not support CSS, or you have CSS switched off. For a better web experience, I recommend using a modern browser. Until then, an older version of this site will look better in your browser.

home :: computers :: internet :: email :: warning.txt

Wed, 23 Mar 2005

Oh, so that’s why no one replied to my email

While wondering idly why no-one had replied to my emails for a while, I checked the status of the spool and received some delightful news:

jdb@bigbox:~$ mailq
2005-03-22 16:28:01  563 bytes
2005-03-22 18:06:25  837 bytes
2005-03-22 18:07:12  25462 bytes
2005-03-22 23:09:25  1144 bytes
2005-03-22 23:28:17  2990 bytes
2005-03-23 00:28:01  563 bytes
2005-03-23 04:07:01  562 bytes
2005-03-23 04:07:10  1068 bytes
2005-03-23 04:07:10  1206 bytes
2005-03-23 04:22:01  2054 bytes
2005-03-23 06:38:54  18937 bytes
2005-03-23 08:28:01  563 bytes
2005-03-23 10:38:16  2898 bytes
2005-03-23 10:42:10  2547 bytes
2005-03-23 10:43:40  2010 bytes
2005-03-23 10:44:26  1038 bytes
2005-03-23 11:22:40  523 bytes
2005-03-23 13:27:31  1401 bytes
2005-03-23 14:56:11  982 bytes
2005-03-23 16:14:35  3904 bytes
2005-03-23 16:28:01  561 bytes
2005-03-23 16:37:41  943 bytes
2005-03-23 19:35:21  494 bytes
2005-03-23 21:04:18  6257 bytes

Mail had been backing up for the past 24 hours and I hadn’t even noticed it. It wouldn’t be the first time this had happened – frequent wedging was one reason why I switched from exim to nullmailer, on the principle that a simpler mta would be a more reliable MTA (that, and Harvard firewalls port 25, so there was no point in running a real SMTP server anyway).

Restarting nullmailer cleared the queue, but left me wondering how to notify myself next time this happened. I couldn’t use email, for obvious reasons. I considered having a sound play through the speakers if the queue seemed wedged, but that would only work when I was at home.

I settled on a cron job to periodically dump the output from mailq to a file. My RSS reader, feedonfeeds, now prepends this file’s contents in giant honking red letters to my RSS display — procrastination via RSS now has a purpose!

While writing this, it occured to me that another solution would be to alias mutt to a script that alerted me if the queue was non-empty before running mutt:

#!/bin/sh

# warns user if WATCH's output is nonempty before running mutt

MUTT=/usr/bin/mutt
WATCH=/usr/bin/mailq
TMP=`/bin/tempfile`

$WATCH > $TMP

if [[ -s $TMP ]] ; then
    less $TMP ;
fi

rm $TMP

$MUTT