#!/bin/sh
#
# $Id: senduumail,v 1.2 1997/06/08 10:25:24 mj Exp $
#
# Send file as UUENCODEd mail
#
# usage: senduumail user@domain file
#

# Configure me!!!
# MTA, bounced mail to /dev/null (nobody alias)
MAILER="/usr/sbin/sendmail -fnobody@abra.de"

if [ $# -ne 2 ]; then
  echo "usage: senduumail user@domain file"
  exit 1
fi

user=$1
file=$2

uuencode $file `basename $file` | $MAILER $user
st=$?
if [ $st -ne 0 ]; then
  echo "ERROR: senduumail $user $file failed"
  exit 1
fi

exit 0
