From: wusel@hactar.hanse.de (Kai 'wusel' Siering)
Newsgroups: alt.sys.amiga.uucp
Subject: Re: more cnews questions
Date: Sun, 20 Dec 1992 06:47:48 +0100
Reply-To: Kai 'wusel' Siering <wusel@hactar.hanse.de>
 <1992Dec19.162525.2680@ckctpa.UUCP>
Organization: Villa Straylight, Hamburg, FRG
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: Arn V1.00

In article <1992Dec19.162525.2680@ckctpa.UUCP>, Frank "Crash" Edwards writes:

% steve@Celeborn.lvunix.com (Steve Slade) writes:

% >2) When ever a newgroup message comes across from the control newsgroup. cnews
% >creates it just fine but after looking in my errlog file I find the following.
% >
% >>To: usenet
% >>Subject: newgroup error
% >>
% >>newsgroup comp.archives.msdos.announce created by tale@news1.UU.NET
% >
% >Why does this get posted to errlog?  It creates the proper active entry and
% >news dir.?  (I get messages sent to it by my feed) The only error I can think
% >of is it creates a messydoss group on my beloved amiga 8^)
%
% The Unix side of CNews would send email to the news administrator
% informing them that a group had been created.
%
% I don't see that Subject line in the newgroup.c program, tho.  I do see
% "Subject: newgroup control message".  Is that the message you got?  If
% so, then the reason was simply notification that some action had taken
% place.  At the time, I didn't like the methods of making real email
% work under both 1.3 and 2.04.  Hopefully wusel will be able to make
% that change as well.  (The mail() subroutine should just call a real
% mailer.  Not tough if you're sticking to 2.x AmigaDOS.)

     I don't support 1.3 (too much hazzle; ixemul.library shows that it is
possible =:->, but as there is already a version running under 1.3, there
is no real need for it -- IMO) anymore.

     Anyway, the implementation of control messages has been adopted from
the way it was handled in `Amiga UUCP Plus': `relaynews' calls `uulib:news/-
bin/newscontrol' which in turn tries to execute `uulib:news/bin/<control>'.
Thus you can add whatever things you want to be done on certain control mes-
sages this way; if your program/script returns non-zero (which is also the
case if there's no program/script for a certain cmsg =:->), `newscontrol'
does some magics internally (for `newgroup', `rmgroup', `sendsys', `version',
and `uuname'). For example:

uulib:news/bin/newgroup
---------------------------------------8<---------------------------------------
.key file/a,allowed
.bra {
.ket }

if not exists {file}
   echo "File {file} does not exist!"
   quit 5
endif

SeparateHeaderAndBody <{file} t:{$$}.newgroup.hdr t:{$$}.newgroup.bdy
findconfig >env:{$$}TMPhostname nodename domainname

echo >env:{$$}TMPnewsid "`egrep -i ^message-id: t:{$$}.newgroup.hdr`" first 13
echo >env:{$$}TMPnewsdate "`egrep -i ^date: t:{$$}.newgroup.hdr`" first 7
echo >env:{$$}TMPnewsfrom "`grep -i ^from: t:{$$}.newgroup.hdr`" first 7
echo >env:{$$}TMPnewscntrl "`egrep -i ^control: t:{$$}.newgroup.hdr`" first 10

;args env:{$$}TMParg <env:{$$}TMPnewscntrl
;if not exists uumail:${$$}TMParg1
;   echo >uumail:${$$}TMParg1 "forward to |newsgate ${$$}TMParg1"
;endif

echo  >t:{$$}.newgroup.reply "From: news@${$$}TMPhostname (Your Servant)"
echo >>t:{$$}.newgroup.reply "To: news@${$$}TMPhostname (Master of the News)"
echo >>t:{$$}.newgroup.reply "In-Reply-To: ${$$}TMPnewsid; from *"${$$}TMPnewsfrom*" at ${$$}TMPnewsdate"
echo >>t:{$$}.newgroup.reply "Reply-To: postmaster@${$$}TMPhostname (${$$}TMPhostname Postmaster)"
echo >>t:{$$}.newgroup.reply "Subject: ${$$}TMPnewscntrl by ${$$}TMPnewsfrom*N"
ident <{file} >>t:{$$}.newgroup.reply "> "
sendmail <t:{$$}.newgroup.reply

delete env:{$$}TMP#? t:{$$}.newgroup#? quiet
quit 10  ; return non-zero so internal newscontrol code handles the newgroup
--------------------------------------->8---------------------------------------

     This sends me every `newgroup' message AND lets `newscontrol' perform
the needed active-file modifications (i. e. all new-/rmgroups are performed
instandly; this works for the groups I receive, your mileage may vary).

     I plan to let `newscontrol' set a bunch of local variables in order to
ease up writing shell scripts one day; the above is so horribly slow =:-<

     Actually, I'm awaiting suggestions from the users, but for now, every-
one should be able to live with this solution ...

Merry Christmas,
			kai

P.S.: Anybody currently running the so-called alpha release of `wCNews',
      please contact me/note that there will be a `official' release in
      mid-January 1993; if you want to, you can uucp/BMS it from hactar,
      it's currently in small beta test (4 additional sites).

           THIS DOES NOT APPLY TO `NORMAL USERS'! I expect some feedback
      about installation and documentation from the beta poeple, so PLEASE
      WAIT UNTIL 1993!

--  _
 _ //   Kai 'wusel' Siering, Villa Straylight, Hamburg, Germany. Go for MIME!
 \X/: <wusel@hactar.hanse.de>  Exile: <wusel@wolfhh.hanse.de>  iso-8859-1: 

              /away 18.12.1992 - 04.01.1993 (Phone: +49-4755-648)

"So sind sie, die Frauen ..."
                                                                -- Slegde Hammer