Article View: news.software.nn
Article #7552Re: Need RECMAIL for NN and MMDF
From: Robert Lipe
Date: Fri, 29 Mar 1996 00:00
Date: Fri, 29 Mar 1996 00:00
107 lines
3008 bytes
3008 bytes
In <4jem1i$4ba@rohan.btg.com> paul@pfischer (Paul Fischer of BTG Inc. Office Automation) writes:
>I know there is a "recmail" script for use with MMDF out there in
>the SCO community. Could someone send me a copy of it please.
Paul, I know you sent me your mail address yesterday, but I didn't keep it.
I've attached the recmail I used to use. However, on my OpenServer 5
box that runs MMDF, I now use /usr/lib/sendmail -t and it works swimmingly.
It is part of the OS.
#!/bin/sh
# This is my version of a mailer that parses the To: lines and invokes the
# domain-based mailer mfr Jul 89
export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$)
# System dependencies
# mailer="/usr/local/smtp"
mailer="/usr/bin/mailx"
# your site name
case define in
define) sitename=`hostname` ;;
undef) sitename="puppsr" ;;
esac
test=test
sed=/bin/sed
echo=/bin/echo
cat=/bin/cat
grep=/bin/grep
rm=/bin/rm
dotdir=${DOTDIR-${HOME-$LOGDIR}}
tmpart=$dotdir/.letter
ttmpart=$dotdir/.letter_
tee $tmpart | egrep -v "^Subject:|^To:" >$ttmpart
case $mailer in
*sendmail)
$mailer -t <$tmpart
;;
# but recmail does not know about Bcc, alas
*recmail)
$mailer <$tmpart
;;
*)
set X `$sed <$tmpart -n -e '/^To:/{' -e 's/To: *//p' -e q -e '}'`
shift
set X "$@" `$sed <$tmpart -n -e '/^Cc:/{' -e 's/Cc: *//p' -e q -e '}'`
shift
set X "$@" `$sed <$tmpart -n -e '/^Bcc:/{' -e 's/Bcc: *//p' -e q -e '}'`
shift
subject=`$sed <$tmpart -n -e '/^Subject:/{' -e 's/Subject: *//p' -e q -e '}'`
# shift
for i in "$@"
do
# thost=`echo $i | cut -s -d@ -f2`
# recip=`echo $i | cut -s -d@ -f1`
recip=`echo $i | cut -s -f1`
recip=`echo $i`
# sender=${LOGNAME}@${sitename}
$grep -v "^Bcc:" <$ttmpart | $mailer -s "$subject" $recip
done
;;
esac
case $? in
0)
state=cleanup
;;
*)
state=rescue
;;
esac
case $state in
rescue)
$cat $tmpart >> ${HOME-$LOGDIR}/dead.letter
$echo "Message appended to ${HOME-$LOGDIR}/dead.letter"
$echo "A copy may be temporarily found in $tmpart"
exit
;;
cleanup)
case "${MAILRECORD-none}" in
none)
;;
*) if $cat $tmpart >> $MAILRECORD; then
$echo "Article appended to $MAILRECORD"
else
$echo "Cannot append to $MAILRECORD"
fi
;;
esac
exit
;;
esac
done
--
Robert Lipe
Technical Details
Message-ID:
<4jfdna$4ui@gw.dgii.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!not-for-mailReferences:
<4jem1i$4ba@rohan.btg.com>Show Full Headers
Complete Article Headers
Message-ID: <4jfdna$4ui@gw.dgii.com> Subject: Re: Need RECMAIL for NN and MMDF Date: Fri, 29 Mar 1996 00:00:00 +0000 From: robertl@dgii.com (Robert Lipe) References: <4jem1i$4ba@rohan.btg.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!not-for-mail X-Deja-AN: 144762010 Organization: Digi International Newsgroups: news.software.nn