> There is no reason to use another program or modify xbiff. It already has > the hooks you need. > > In /usr/lib/X11/app-defaults/XBiff: > > *checkCommand:/usr/local/bin/checkmail > > In /usr/local/bin/checkmail: Here's a slightly improved version of checkmail (fewer forks, less space used by .prevmail etc.): -------- #!/bin/sh # Copyright (c) 1998 Software in the Public Interest # written by Philip Hands (2 April 1998), inspired by a # script by Timothy L. Mayo , distributed under the GPL EMPTY="d41d8cd98f00b204e9800998ecf8427e" SUM="md5sum" # if you don't have md5sum, use something like these two lines instead # EMPTY="00000 0" # SUM="sum -r" MAILSUM="`ls $HOME/Maildir/new | $SUM`" # if "new" is empty, remove the debris, and exit if [ "$MAILSUM" = "$EMPTY" ]; then test -f $HOME/.prevmail && rm $HOME/.prevmail exit 2 fi # check if the sums are unchanged if [ -f $HOME/.prevmail ] && [ "$MAILSUM" = "`cat $HOME/.prevmail`" ]; then exit 1 fi # otherwise new mail has arrived echo -n $MAILSUM > $HOME/.prevmail exit 0 # End of Script -------- I know it's a bit sad optimising shell scripts, but I'm going to include this in my Debian qmail-src package, so I thought I'd fix it a little.