From:	CSBVAX::CSBVAX::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 27-FEB-1989 12:15
To:	MRGATE::"ARISIA::EVERHART"
Subj:	Re: ANU News 5.7 Questions


Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Sat, 25 FEB 89 15:01:29 PDT
Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Sat, 25 Feb 89 14:58:09 PST
Received: by ucbvax.Berkeley.EDU (5.61/1.34)
	id AA21279; Sat, 25 Feb 89 13:29:30 -0800
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 22 Feb 89 00:09:54 GMT
From: munnari!otc!metro!basser!usage!ccadfa!anucsd!csc3!csc!gih900@uunet.uu.net  (Geoff Huston)
Organization: VMS NEWS V5.2
Subject: Re: ANU News 5.7 Questions
Message-Id: <1682@csc.anu.oz>
References: <8902170256.AA16891@ucbvax.Berkeley.EDU>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

In article <8902170256.AA16891@ucbvax.Berkeley.EDU>, LUSGR@VAX1.CC.LEHIGH.EDU (STEVE ROSEMAN) writes:
> Questions about ANU News, V5.7.
>  
> 1:  How do the moderated network-wide groups get their /MODERATE=xxx.xxx.xxx
> set?  The manual mentions a "checkgroups" control message, but until I
> get one of those, are moderated groups not moderated?

There are two parts to this question - firstly how do you know which newsgroups
are moderated and which are not? and secondly how do you determine the address
of the moderator of a moderated newsgroup?

The first part is normally determined by receipt of a "checkgroups" message,
which lists all valid newsgroup names in your neck of the woods. A less
accurate way of setting up the newsgroups is to look at the regular postings
in news.lists (and news.admin) which list the valid newsgroups.

To determine the address of a moderator, have a read of the contents of the
mailpaths.; file in the distribution. This information is also posted regularly
in news.lists, and describes the backbone site mailer system. The idea is that
all you need to supply in the mailpaths configuration file is the address of
the closest backbone mailer, and NEWS will direct all moderated postings to the
correct address at the backbone site. 

> 2:  At first, the SYS filter was rejecting messages from groups I had
> specified as wanting.  I discovered that adding the names included in
> the 'distribution' field got them.  eg.
>  
> 	NEWS.SYS specified accept 'rec'
> 	item 1 was for newsgroup 'rec.frog', distribution was blank, the
> 		message was accepted.
> 	item 2 was for newsgroup 'rec.frog', distribution was 'usa', the
> 		message was rejected.
>  
> So, I added 'usa', 'na', 'world', and some other places I am.
> Now, we are getting and accepting messages from 'nj.whatever' and 'aus.blah',
> even though 'nj' and 'aus' are not in the list.  How do I keep them
> out, and still get all of the 'rec'?

This is a bug. The code in NEWSSITE.C, as distributed, has an error in the
function test_accept(). A fixed version follows.

Geoff Huston
Computer Services Centre, Austrlaina National University

gih900@csc.anu.oz           psi%(0505)26244003211::gih900

----------------------/-/-/-/-------------------------------------------

NEWSSITE.C    test_accept()

static test_accept(groups,dist,f)
    char *groups,
         *dist;
    struct sys_filter *f;
{
    char *cp1,
         *cp2,
         locname[132],
         wname[132],
         line[512];
    int accept = 0;
    struct sys_filter *f_sav = f;

    strcpy(line,groups);
    cp1 = line;

    if (!f) return(1);
    do {
        if (cp2 = strchr(cp1,',')) *cp2++ = '\0';
        util_cvrt(locname,cp1);
        f = f_sav;
        while (f) {
            if (*f->sys_filtnam == '!') {
                if (wild_match(locname,f->sys_filtnam + 1)) return(0);
                else {
                    strcpy(wname,f->sys_filtnam + 1);
                    strcat(wname,".*");
                    if (wild_match(locname,wname)) return(0);
                    }
                }
            else {
                if (wild_match(locname,f->sys_filtnam)) accept = 1;
                else {
                    strcpy(wname,f->sys_filtnam);
                    strcat(wname,".*");
                    if (wild_match(locname,wname)) accept = 1;
                    }
                }
            f = f->sys_fnext;
            }
        cp1 = cp2;
        } while ((!accept) && (cp1));

    if (!accept) return(0);
    if ((!dist) || (!*dist)) return(accept);

    accept = 0;
    strcpy(line,dist);
    if (!strcmp(line,"all")) return(1);
    cp1 = line;
    do {
        if (cp2 = strchr(cp1,',')) *cp2++ = '\0';
        util_cvrt(locname,cp1);
        f = f_sav;
        while ((!accept) && (f)) {
            if (*f->sys_filtnam == '!') {
                if (!strcmp(locname,f->sys_filtnam + 1)) return(0);
                else {
                    strcpy(wname,f->sys_filtnam + 1);
                    strcat(wname,".*");
                    if (wild_match(locname,wname)) return(0);
                    }
                }
            else {
                if (!strcmp(locname,f->sys_filtnam)) accept = 1;
                else {
                    strcpy(wname,f->sys_filtnam);
                    strcat(wname,".*");
                    if (wild_match(locname,wname)) accept = 1;
                    }
                }
            f = f->sys_fnext;
            }
        cp1 = cp2;
        } while ((!accept) && (cp1));
    return(accept);
}

