ietf-nntp new draft of the NNTP spec released

pmee at uk.tobit.com pmee at uk.tobit.com
Tue Jul 20 06:13:08 PDT 1999


It appears to me that all responses to my original clarification query are indicating that 
the ! character should only ever be considered as special if it is the first character.  
Also previous drafts have ignored the ! character, defined it separately as well as the 
currently draft depicting it as a wildmat special (this is in part written to show I'm not 
just jumping in at the deep end ;-) ).

The current draft reads as follows: "The fifth operation uses the exclamation mark (!) 
preceding any valid expression built using any of the operators discussed prior to this 
sentence."  This therefore allows the use of the ! character, but gives no limitation to 
it's positioning.  RFC 977 dictates that the ! character (only depicted in the NEWNEWS 
command notation) negates a match (I realise this does not refer to wildmat) but only 
implies that it should be used at the beginning of the group wildcard by it's example 
usage.

Having looked through recent INN source (inn-STABLE_2_2-1999-07-05_03-02) it appears there 
are no references to the ! character in the wildmat code but the PERMmatch function 
reverses the result of the wildmat if the first character is !.  The PERMmatch is used in 
CMDlist, CMDnewgroups, CMDgroup,  CMDnewnews and ARTpost and also in the CMDfetch through 
the PERMartok function.  While this is a brief disection of the code based on the wildmat 
function (in wildmat.c) and an experienced INN coder would be able to confirm / correct 
it's use, I would be surprised to find two separate definitions of the wildmat format in 
such a long-standing open source as INN.  INN also gives special meaning to the comma and 
implicitly to the space and htab characters for use as delimiters to the list of groups 
(this is done in the NEWNEWS by passing to the NGgetlist command which interprets commas 
as space and subsequently passes the altered group list to Argify which interprets space 
and htab as delimiters).  This is all done before treating each delimited group as 
PERMmatch.

So, hopefully to concatentate current knowledge and to shorten the debate of what is and 
what isn't current practise I surmise that:

RFC 977 indicates that the parameter to NEWNEWS used to determine which groups to match 
the command against allows for a comma-delimited list of wildcarded (with optional 
negation) groups.  Current practise of one (popular) NNTP server shows that comma, space 
and htab are used as delimiters for this notation and that the wildcarded group notation 
assumed is (negatable) wildmat.  Other commands are also expanded in current practise to 
allow the wildcarding notation from NEWNEWS to be used as their group parameter.

RFC 977 implies that the precedence order of the delimited list of wildcarded notation 
should be that the listing be read left-to-right with the left-most group having least 
precedence, the right-most group having most precedence.  Precedence order in current 
practise also appears to comply with this implication.

Popular consensus shows that the ! character should be interpreted as a special wilmdat 
character only if at the beginning of a wildmat.  This is backed up by implementation 
details of a (said same) NNTP server.  However, documentation has never (too strong?) 
depicted the positioning of the ! to be solely at the beginning.

The ambiguity of the documentation has given rise to an implied meaning for the full stop 
character.  Example interpretations of (for example) alt.*!foo* appear to hinge on the 
preceding full stop (.) character (i.e., alt.*!foo* expands to alt*,!alt.foo* with 
first=least precedence).  Even further interpretation based on the ambiguity of !'s 
positioning gives rise to multiple ! characters in a single wildcard group notation.  This 
achieves three interpretations of alt.*!foo*!bar* (all assume first=least precedence):

1) alt*,!alt.foo*,alt.foo*bar*  (double ! implying OK for alt.foo*bar*)
2) alt*,!alt.foo*,!alt.foo*bar* (useless verbage notation)
3) alt*,!alt.foo*,!alt.bar*     (alt.* is base, all ! indicate new basic not)

Russ has detailed another character (@) which is used in place of ! (don't recall seeing 
this notation before myself, so I'll re-interpret to query my understanding).  This 
character, if the accompanying specific group (not wildmat?) is matched, determines that 
any messages within the group who's newsgroups header field would otherwise be included in 
the command, should be excluded (no specifics in the example documentation of which 
commands this applies to).  This description implies a precedence order to the group 
listing though no details are given.

I have also seen notation whereby the ! character may be used instead of the ^ character 
for set notation (it's meaning in this context is the same as ^).

(Summary over.)

Are there any other factors to the wildmat notation that should be considered / I have 
missed?

It might be easier once we have all known issues (of wildmat anyway) detailed in one place 
to then be able concentrate on pros & cons of individual notations.  (BTW: I don't mean to 
sound like a co-ordinator... I'd rather have all possibles in full view first...)

Best regards,

Peter Mee

-- 
Peter Mee
Technical Support
Tobit Software Ltd.
Redwither Tower
Redwither Business Park
Wrexham
LL13 9XT

Tel: 01978 666 920
Fax: 01978 666 921
E-mail: pmee at uk.tobit.com


-------- Original Message --------
Subject: Re: ietf-nntp new draft of the NNTP spec released (20-JUL-1999 1:12)
From:    rra at stanford.edu
To:      pmee at uk.tobit.com

[ Resending a previous message because I wasn't subscribed properly. ]

Charles Lindsey <chl at clw.cs.man.ac.uk> writes:

> But in the end I suspect that compatibility with existing INN practice
> is what we really want, so it would be useful to document what that
> is.

I'm not completely happy with this explanation yet, since the description
of poison wildcards isn't yet quite what is done in practice.  But it's
relatively decent for exclusion wildcards.  This is from INSTALL in INN
2.3.

    Before we begin, it is worth mentioning the wildmat pattern matching
    syntax used in many configuration files.  These are simple wildcard
    matches using the asterisk (`*') as the wildcard character, much like
    the simple wildcard expansion used by Unix shells.

    In many cases, wildmat patterns can be specified in a comma-separated
    list to indicate a list of newsgroups.  When used in this fashion, each
    pattern is checked in turn to see if it matches, and the last pattern in
    the line that matches the group name is used.  Patterns beginning with
    `!' mean to exclude groups matching that pattern.  For example:

        *, !comp.*, comp.os.*

    In this case, we're saying we match everything (`*'), except that we
    don't match anything under comp (`!comp.*'), unless it is actually under
    the comp.os hierarchy (`comp.os.*').  This is because non-comp groups
    will match only the first pattern (so we want them), comp.os groups will
    match all three patterns (so we want them too, because the third pattern
    counts in this case), and all other comp groups will match the first and
    second patterns and will be excluded by the second pattern.

    Some uses of wildmat patterns also support "poison" patterns (patterns
    starting with `@').  These patterns behave just like `!' patterns when
    checked against a single newsgroup name.  Where they become special is
    for articles crossposted to multiple newsgroups; normally, such an
    article will be considered to match a pattern if any of the newsgroups
    it is posted to matches the pattern.  If any newsgroup the article is
    posted to matches an expression beginning with `@', however, that
    article will not match the pattern even if other newsgroups to which it
    was posted match other expressions.

    See wildmat(5) for full details on wildmat patterns.

-- 
Russ Allbery (rra at stanford.edu)         <URL:http://www.eyrie.org/~eagle/>


More information about the ietf-nntp mailing list