#!/bin/sh

############################################
# Description:
#    Simple script to establish an SSH connection
#    to a remote host and run sendmail directly
# Author:  Bill Farrow
#	   Mike Pilone
# License: BSD
##############################################

# Edit the following variables to configure the script

# The username used to connect to the mail server. Note that this
# may not be your POP3 username, but the username used in an SSH
# connection.
SSH_USERNAME=jsmith

# The name of the mail server to connect to. This server is assumed to 
# be running an SSH daemon as well.
SSH_SERVER=mail.fakehost.com

# Advanced option. This is the path to the sendmail command
# on the remote machine. Most standard distributions will
# have sendmail located in the default path so this
# option does not need to be modified.
SENDMAIL_COMMAND=/usr/sbin/sendmail

#####################################################
# Do not edit anything below this line
#####################################################

# The SSH command which will establish the connection to the mail server
# then run sendmail on the server.
ssh $SSH_USERNAME@$SSH_SERVER $SENDMAIL_COMMAND $@
