File: senduumail.sh

package info (click to toggle)
fidogate 4.2.8-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,800 kB
  • ctags: 2,844
  • sloc: ansic: 22,020; perl: 2,885; sh: 1,551; yacc: 671; makefile: 585
file content (29 lines) | stat: -rw-r--r-- 493 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
#
# $Id: senduumail.sh,v 4.1 1996/12/29 12:18:02 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@fido.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