cdr@bach.amd.com (Carl Rigney) (05/07/90)
Here's a similar patch - it silently rejects alt newgroups more than
3 levels deep, and sends all other alt newsgroups to the news administrator.
I thought about adding a decision based on who its from, but that can
be forged too, so why bother?
*** newgroup.old Fri May 4 19:04:52 1990
--- newgroup Fri May 4 19:13:31 1990
***************
*** 1,6 ****
--- 1,8 ----
#! /bin/sh
# newgroup group flag - create group (4-field version: B-2.10.3+ compatible)
# subject to our sys file group pattern
+ #
+ # cdr@amd.com 90/5/4 added alt-patch
# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usr/local/lib/news/bin/config}
***************
*** 19,24 ****
--- 21,34 ----
SENDER="`grep '^Sender:' $hdr | sed 's/^[^:]*: *//'`"
case "$SENDER" in
"") SENDER="`grep '^From:' $hdr | sed 's/^[^:]*: *//' `" ;;
+ esac
+
+ # forward alt groups to admin for manual creation
+ case "$1" in
+ alt.*.*.*) exit;; # ignore stupid alt groups
+ alt.*) echo "addgroup $1 says $SENDER" | mail $NEWSMASTER
+ exit;;
+ *) ;;
esac
greppat="^`echo $1 | sed 's/\./\\\\./g' ` "