From: devet@adv.win.tue.nl (Arjan de Vet) Subject: [SOURCE] /bin/mail using fastmail from Elm Date: 30 Mar 1993 14:06:36 GMT
In article <c598d4e0%fido.de@p100.f2003.n241.z2.fidonet.org> Michael_Kraehe@p100.f2003.n241.z2.fidonet.org (Michael Kraehe) writes:
>I had many problems with rotten /bin/mail :-( So I've written a new one,
>witch was a easy task, because the only /bin/mail now does is to choose
>between smail & elm :-)
I also had problems with /bin/mail (needed group write permissions on mail
folders and many headers where wrong or missing). I just needed a /bin/mail
program which would accept an optional `-s subject' and one or more
addresses. Elm comes with a nice command line mailer called fastmail.
Fastmail calls /usr/lib/sendmail (which is just smail) and you get correct
headers, also for outbound addresses. So this is my /bin/mail (simple but
sufficient for my purposes):
#!/bin/sh
cat - > /tmp/mail$$
SUBJECT=""
if [ X$1X = X-sX ]
then
SUBJECT=$2
shift; shift
else
SUBJECT="no subject"
fi
# $* are now the destinations
/usr/local/bin/fastmail -s "$SUBJECT" /tmp/mail$$ $*
rm /tmp/mail$$
Arjan