#!/bin/sh
# querypost: query our post server whether there is mail waiting for us.
# Copyright 1994-6 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/demon.mail

# Make sure we clean up on any exit
# trap "rm -f $tmpfile" 0

# Check for waiting mail.
/usr/bin/finger ${sitename}@${post_server} >$tmpfile 2>&1
/bin/echo ""
/bin/cat $tmpfile
/bin/echo ""
