leo@aai.uucp (Leo Pinard) (12/05/89)
I have just installed C news at our site. It seems to be faster than B news, but B news has several configuration options that were useful and I would like to know if it is possible to do the same in C news. MANUALLY - rmgroup messages mail a message rather than deleting a group NONEWGROUPS - sends mail instead of creating groups INTERNET - together with LIBDIR/mailpaths routes internet mail to a site that understands internet headers. Since we get all our news from uunet, this is very useful! Is it possible to do these things with C news? Where can I find the details? Thanks, Leo
henry@utzoo.uucp (Henry Spencer) (12/06/89)
In article <1989Dec5.080052.3532@aai.uucp> leo@aai.UUCP (Leo Pinard) writes: >... B news has several configuration options that were useful >and I would like to know if it is possible to do the same in C news. > >MANUALLY - rmgroup messages mail a message rather than deleting a group This is the default in C News; actually, we consider it the only sane policy. Inspect the $NEWSBIN/ctl/rmgroup shell file if you want to know how it's done. In the relay/altctl directory in the sources, you will find an old (and not recently tested) version of rmgroup that actually tries to do the removal. We don't recommend it. >NONEWGROUPS - sends mail instead of creating groups This one isn't the default, since we consider group creation relatively harmless. We haven't got a terribly convenient way of changing this, although one that will certainly work is to just remove the shell program ($NEWSBIN/ctl/newgroup) that does new-group creation; that will result in a complaint via mail when such a control message arrives. A tidier but more complicated alternative is to change the shell program to implement whatever policy you want. >INTERNET - together with LIBDIR/mailpaths routes internet mail to a >site that understands internet headers. Since we get all our news >from uunet, this is very useful! This is Geoff's department more than mine, but I think this again is the default. We don't understand the custom of making normal, sensible behavior available only as "options", and we try to avoid it. -- Mars can wait: we've barely | Henry Spencer at U of Toronto Zoology started exploring the Moon. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
hoyt@polyslo.CalPoly.EDU (Sir Hoyt) (12/06/89)
In article <1989Dec5.172135.27648@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: >In article <1989Dec5.080052.3532@aai.uucp> leo@aai.UUCP (Leo Pinard) writes: >>NONEWGROUPS - sends mail instead of creating groups > >This one isn't the default, since we consider group creation relatively >harmless. We haven't got a terribly convenient way of changing this, >although one that will certainly work is to just remove the shell program >($NEWSBIN/ctl/newgroup) that does new-group creation; that will result >in a complaint via mail when such a control message arrives. A tidier >but more complicated alternative is to change the shell program to >implement whatever policy you want. Find attached a version of $NEWSBIN/ctl/newsgroup that send mail to $NEWSMASTER about new group creation control message. ( Don't forget to remove the 'X' from the begining of the line ) ------------------ CUT HERE --------------------- CUT HERE --------------------- X#! /bin/sh X# newgroup group flag - create group (4-field version: B-2.10.3+ compatible) X# subject to our sys file group pattern X X# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()= X. ${NEWSCONFIG-/usr/local/lib/news/bin/config} Xexport NEWSCTL NEWSBIN NEWSARTS XPATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH # include mkpdir Xumask $NEWSUMASK X Xhdr=/tmp/nc$$ X Xtrap "rm -f $hdr; exit 0" 0 Xcanonhdr >$hdr X X# unapproved ctl msg? then quit Xgrep -s '^Approved:' $hdr >/dev/null || { rm -f $hdr; exit 0; } X XSENDER="`grep '^Sender:' $hdr | sed 's/^[^:]*: *//'`" Xcase "$SENDER" in X"") SENDER="`grep '^From:' $hdr | sed 's/^[^:]*: *//' `" ;; Xesac X Xgreppat="^`echo $1 | sed 's/\./\\\\./g' ` " Xif grep -s "$greppat" $NEWSCTL/active >/dev/null; then # group exists? X export SENDER X chamod "$1" "$2" # change moderated flag if needed X exit Xfi X Xme="`newshostname`" Xgngppat=`awk -f $NEWSBIN/relay/canonsys.awk $NEWSCTL/sys | X egrep "^($me|ME):" | X awk -F: ' X{ X fields = split($2, field2, "/") # split ngs/dists X print field2[1] # print only ngs X exit X}' ` X Xif gngp -a "$gngppat" >/dev/null <<! X$1 X! Xthen # no group in active, but sys file likes it: make it X case "$2" in X moderated) flag=m ; MOD="moderated" ;; X *) flag=y ; MOD="unmoderated" ;; X esac X X echo "Newsgroup $1 request" > /tmp/mail$$ X echo " " >> /tmp/mail$$ X echo "$SENDER request that newsgroup $1 be created." >> /tmp/mail$$ X echo "The group should be $MOD" >> /tmp/mail$$ X echo "The group can be made with the following command: " >> /tmp/mail$$ X echo " " >> /tmp/mail$$ X echo "$NEWSBIN/maint/addgroup $1 $flag" >> /tmp/mail$$ X echo " " >> /tmp/mail$$ X /usr/ucb/mail -s "Newsgroup $1 creation request" $NEWSMASTER < /tmp/mail$$ X rm -f /rmp/mail$$ X Xfi -- John H. Pochmara A career is great, UUCP: {sdsu,voder,trwind}!polyslo!hoyt But you can't run your Internet: hoyt@polyslo.CalPoly.EDU fingers through its hair -Graffiti 4/13/83
allbery@NCoast.ORG (Brandon S. Allbery) (12/06/89)
While we're on the subject of alternative newgroup control message handlers,
here's ncoast's hack on the standard one. It traps alt groups and requests
manual creation; just the thing for those of you who are sick of seeing all
the newgroups for alt.stupidity, alt.weemba.all, etc. ;-)
-----------------------------------cut here-----------------------------------
#! /bin/sh
# newgroup group flag - create group (4-field version: B-2.10.3+ compatible)
# subject to our sys file group pattern
# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usr/lib/news/bin/config}
export NEWSCTL NEWSBIN NEWSARTS
PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH # include mkpdir
umask $NEWSUMASK
F=/tmp/nc$$
trap "rm -f $F; exit 0" 0
cat >$F
# unapproved ctl msg? then quit
grep -s '^Approved:' $F >/dev/null || { rm -f $F; exit 0; }
SENDER="`grep '^Sender:' $F | sed 's/^[^:]*: *//'`"
case "$SENDER" in
"") SENDER="`grep '^From:' $F | 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 alt >/dev/null <<!
$1
!
then
echo "$SENDER requests creation of $2 newsgroup $1." | mail $NEWSMASTER
elif 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
echo "$1 0000000000 0000000000 $flag" >>$NEWSCTL/active
(echo "$1 `getdate now` $SENDER" >>$NEWSCTL/active.times) # rn hook
# make the directory since rn will bitch if it's missing
mkpdir $NEWSARTS/`echo $1 | tr . / `
echo "newsgroup $1 was created by $SENDER." | mail $NEWSMASTER
fi
-----------------------------------cut here-----------------------------------
++Brandon
--
Brandon S. Allbery allbery@NCoast.ORG, BALLBERY (MCI Mail), ALLBERY (Delphi)
uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu bsa@telotech.uucp
*(comp.sources.misc mail to comp-sources-misc[-request]@backbone.site, please)*
*Third party vote-collection service: send mail to allbery@uunet.uu.net (ONLY)*
expnet.all: Experiments in *net management and organization. Mail me for info.
tale@cs.rpi.edu (Dave Lawrence) (12/06/89)
In <1989Dec6.014046.20687@NCoast.ORG> allbery@NCoast.ORG (Brandon S. Allbery): While we're on the subject of alternative newgroup control message handlers, here's ncoast's hack on the standard one. rpi.edu's is a simple change; I want everything created by default (as in standard C News) but I want to see the newgroup message when it happens rather than firing up my news reader and heading to control to get it. After the "Group blah.foo has been created ..." line it just includes the whole article, headers and all. This way I can see right off why Chuq is rmgroup'ing misc.headlines.unitex or why demon@hades.hell is attempting to get alt.whatever created or why a newgroup for alt.swedish.chef.bork.bork.bork ever left Harvey Mudd. Available on request, though the mods are easy enough. Dave -- (setq mail '("tale@cs.rpi.edu" "tale@ai.mit.edu" "tale@rpitsmts.bitnet"))