#!/bin/sh # querypost: query our post server whether there is mail waiting for us. # Copyright 1994-5 John A. Phillips - john@linux.demon.co.uk # usage: querypost [sitename] # Assign the site to be queried. This site defaults if none is specified. sitename=${1:-`/bin/hostname -s`} # Set the post server. post_server=post.demon.co.uk # Assign a temporary file. tmpfile=/tmp/mail.waiting.$$ # Check for waiting mail. /usr/bin/finger ${sitename}@${post_server} 2>&1 >$tmpfile /bin/echo "" /bin/cat $tmpfile /bin/echo "" # Finally, tidy up. rm -f $tmpfile