Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!ubc-cs!alberta!myrias!brb From: brb@myrias.com (Brian Baird) Newsgroups: news.software.b Subject: Re: How to send mail to C news Message-ID: <625276901.17055@myrias.com> Date: 25 Oct 89 01:01:26 GMT References: <1989Oct20.145715.5182@sony.com> <1989Oct21.225543.22780@utzoo.uucp> <1989Oct23.063040.25063@rpi.edu> Organization: Myrias Research, Edmonton Lines: 45 The newsmail(8) man page deals with transmitting news over mail links, not with gatewaying mailing lists into news groups. It is not entirely clear from David Elliott's original posting which he is trying to do. Here's how I gateway about half a dozen mailing lists here. The stuff in contrib seemed a bit overpowered for what I wanted. #! /bin/sh # mailtonews newsgroup [approved-by] # # Inject a mail-list message into the given newsgroup with no fuss. # Typical use is to have a moderated group for the info-foo mail # list called "mail.info-foo". Add an appropriate line to the mailpaths # file, then add the following alias to /usr/lib/aliases: # # info-foolist: "|/usr/lib/news/bin/mailtonews mail.info-foo" # owner-info-foolist: news # # Brian Baird brb@myrias.com # =()<. ${NEWSCONFIG-@@}>()= . ${NEWSCONFIG-/usr/lib/news/bin/config} PATH=$NEWSCTL/bin:$NEWSBIN/inject:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH; export PATH pref=/tmp/m2n$$ hdr=${pref}hdr body=${pref}body sed 1d | tear $pref lines="`sed 1d $body | wc -l`" { echo Newsgroups: $1 echo Path: ${USER-news} egrep -v '^Newsgroups:' $hdr echo Approved: ${2-news@`cat $NEWSCTL/mailname`} echo Lines: $lines cat $body } | relaynews rm $hdr $body exit -- Brian Baird brb@myrias.com Myrias Research, Edmonton {uunet,alberta}!myrias!brb