#!/bin/sh - PATH=$PATH:/usr/local/sbin:/sbin:/usr/sbin:/usr/lib; export PATH umask 077 sent="$HOME/l/mail/sent.mbox" lock="$sent.lock" sendmail="${SENDMAIL-sendmail}" # sentmail - sendmail front-end that archives any stdin to a mbox # Steve Kinzler, kinzler@cs.indiana.edu, Sep 09 # http://www.cs.indiana.edu/~kinzler/home.html#unix trap 'rm -f "$lock"' 0 1 2 13 15 lockfile "$lock" (echo "From ${USER-${LOGNAME-me}}@${HOST-localhost} `date`" >> "$sent" tee -a "$sent" echo '' >> "$sent") | "$sendmail" ${1+"$@"}