#!/bin/sh
###############################################################################
#
# File:         sendmail-remote
# RCS:          /usr/local/sources/CVS/mailapp-utilities/sendmail-remote,v 1.1.1.1 1996/11/24 14:56:17 tom Exp
# Description:  A shell script to have mail sent from host 'remote'
# Author:       Carl Edman
# Created:      Sun Oct 16 09:54:59 1994
# Modified:     Sun Oct 16 10:10:42 1994 (Carl Edman) cedman@freedom.princeton.edu
# Language:     Text
# Package:      N/A
# Status:       Experimental
#
# (C) Copyright 1994, but otherwise this file is perfect freeware.
#
###############################################################################
remote=`echo $0|sed -n 's%^.*/sendmail-%%p'`
if test "$remote" = ""
then
   echo "sendmail-remote must be invoked with a name of the form sendmail-foobar"
   echo "where foobar is the name of the host from which the mail should be sent."
   exit 1
fi
arg="/usr/lib/sendmail "
for i do
  arg="$arg '$i'"
done
rsh $remote $arg
