[news.admin] remind me again. manual newgroups for C news ?

tale@cs.rpi.edu (David C Lawrence) (06/02/90)

Here, I just did this today to my existing newgroup script when I
noticed the first bogus one come in (misc.sheep, I think) in
anticipation of many more.  I intend to revert it again after this
weekend.  Basically all that means is changing the first case patterns
back to "alt.*" from "*" and uncommenting the code lines.

#! /bin/sh
# newgroup group flag - create group (4-field version: B-2.10.3+ compatible)
#	subject to our sys file group pattern
# edited 1 Nov 89 to send the whole article for inspection -- tale
# edited 6 May 90 to not do automatic alt newgroups -- tale
# edited 1 Jun 90 special transient version to deal with stupid forgeries.
#                 yes, i know that the "alt" comment is wrong and a
#                 case statement is useless there.  "Transient."

# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usenet/bin.server/config}
export NEWSCTL NEWSBIN NEWSARTS
PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH # include mkpdir
umask $NEWSUMASK

hdr=/tmp/nc$$
art=/tmp/nc$$all

trap "rm -f $hdr $art; exit 0" 0
cat > $art			# tee: broken pipe: if cat | tee | canonhdr
cat $art | canonhdr >$hdr

# unapproved ctl msg? then quit
grep -s '^Approved:' $hdr >/dev/null || { rm -f $hdr; exit 0; }

SENDER="`grep '^Sender:' $hdr | sed 's/^[^:]*: *//'`"
case "$SENDER" in
"")	SENDER="`grep '^From:' $hdr | sed 's/^[^:]*: *//' `" ;;
esac

greppat="^`echo $1 | sed 's/\./\\\\./g' ` "
if grep -s "$greppat" $NEWSCTL/active >/dev/null; then	# group exists?
	export SENDER
	chamod "$1" "$2" 		# change moderated flag if needed
	exit
fi

me="`newshostname`"
gngppat=`awk -f $NEWSBIN/relay/canonsys.awk $NEWSCTL/sys |
	egrep "^($me|ME):" |
	awk -F: '
{
	fields = split($2, field2, "/")	# split ngs/dists
	print field2[1]			# print only ngs
	exit
}' `

if gngp -a "$gngppat" >/dev/null <<!
$1
!
then			# no group in active, but sys file likes it: make it
	case "$2" in
	moderated)	flag=m ;;
	*)		flag=y ;;
	esac
	case "$1" in
	*) ;;  # Don't automatically create alt groups
#	*) echo "$1 0000000000 0000000001 $flag" >>$NEWSCTL/active ;
#	   (echo "$1 `getdate now` $SENDER" >>$NEWSCTL/active.times) ;
#	   # make the directory since rn will bitch if it's missing
#	   mkpdir $NEWSARTS/`echo $1 | tr . / ` ;;
	esac
	( case "$1" in
	  *) echo "$SENDER attempted to create $1." ;
	     echo "Use \"addgroup $1 $flag\" if you want to have it." ;;
#	  *) echo "Newsgroup $1 was created by $SENDER." ;;
	  esac ;
	  echo ;
	  echo "This was the control message:" ;
	  echo ;
	  cat $art ) | Mail -s "$1 created by $SENDER." $NEWSMASTER
fi

jeffd@ficc.ferranti.com (jeff daiell) (06/02/90)

In article <EMV.90Jun1120325@urania.math.lsa.umich.edu>, emv@math.lsa.umich.edu (Edward Vielmetti) writes:
> 
> having been recently deluged with newgroup messages by Son of
> Biff (all in psu.*), someone please remind me again how to
> do manual "newgroup" messages in C news ?
> 
> there's a lot of trash coming down the pike, sigh.
> 
> "this is the death of usenet as we know it"


But is it the death of Usenet as *others* know it?


Jeff




-- 
                   Fiat Justitia, Ruat Caelum      

emv@math.lsa.umich.edu (Edward Vielmetti) (06/02/90)

having been recently deluged with newgroup messages by Son of
Biff (all in psu.*), someone please remind me again how to
do manual "newgroup" messages in C news ?

there's a lot of trash coming down the pike, sigh.

"this is the death of usenet as we know it"

--Ed