Article View: news.software.nn
Article #1354Re: recmail w/ SCO's MMDF
From: Paul Davison [postmaster]
Date: Tue, 29 Jan 1991 17:30
Date: Tue, 29 Jan 1991 17:30
113 lines
3654 bytes
3654 bytes
In <1991Jan28.181532.20340@odbffm.incom.de> oli@odbffm.incom.de (Oliver Boehmer) writes:
>I'd like to know if there are nn-users out there who use nn with SCO's
>MMDF. Please help me, it would be great. If you could supply a shell script
>or something similar, I'd appreciate it.
I replied to a similar posting some time ago, at which time I posted a
hacked version of recmail.c that comes with Bnews. Since then I've gone
over to using a hacked shell script (plus ca change...). What I do is
use MMDF's "pretend" sendmail (do SCO provide this? I don't know - don't
forget that it's not only SCO users that have MMDF) with the following
script, and all seems well.
You'll need to hack $mailer and $sitename. The only change I made, as
far as I can remember, was to comment out the two "cut" lines since we
don't want to touch any of the addresses - MMDF can cope with that.
Do stick with MMDF - it's an awful lot better to work with than
sendmail.
---- cut here ----
#!/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="/official/nn/lib/sendmail"
# your site name
case undef in
define) sitename=`hostname` ;;
undef) sitename="cs" ;;
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
$cat >$tmpart
case $mailer in
*sendmailoo)
$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
for i in "$@"
do
# thost=`echo $i | cut -s -d@ -f2`
# recip=`echo $i | cut -s -d@ -f1`
sender=${LOGNAME}
$grep -v "^Bcc:" <$tmpart | $mailer $i
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
--
Paul Davison (postmaster for cs.qmw.ac.uk)
UUCP: pd@qmw-cs.uucp | Computer Science Dept
Internet: pd%cs.qmw.ac.uk@nsfnet-relay.ac.uk | QMW, University of London
JANET: pd@uk.ac.qmw.cs | Mile End Road
Voice: +44 71 975 5250 (Direct Dial) | London E1 4NS
Technical Details
Message-ID:
<2884@redstar.cs.qmw.ac.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!ukc!icdoc!qmw-cs!pdReferences:
<1991Jan28.181532.20340@odbffm.incom.de>Show Full Headers
Complete Article Headers
Message-ID: <2884@redstar.cs.qmw.ac.uk> Subject: Re: recmail w/ SCO's MMDF Date: Tue, 29 Jan 1991 17:30:26 +0000 From: pd@cs.qmw.ac.uk (Paul Davison [postmaster]) References: <1991Jan28.181532.20340@odbffm.incom.de> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmdzi!unido!mcsun!ukc!icdoc!qmw-cs!pd Newsgroups: news.software.nn Keywords: nn,recmail,MMDF Sender: usenet@cs.qmw.ac.uk Lines: 113 Nntp-Posting-Host: greendome