ietf-nntp new draft of the NNTP spec released

Russ Allbery rra at stanford.edu
Tue Jul 20 07:05:53 PDT 1999


pmee <pmee at uk.tobit.com> writes:

> 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 !.

Yeah, the parsing for special modifiers (! and @) and for separators
(comma and sometimes whitespace) is currently scattered randomly all over
the code base and for a time some parts were interpreting @ differently
than other parts.  Not good.  It's on my list of things to do to add ! and
@ support directly into wildmat.c so that we can avoid the random code
duplication.

> 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.

Well, all the INN documentation always has.

> 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.

To see an example of the @ character in action, consider the following
wildmat expression:

        *,!alt.binaries*

applied to a newsgroups list of:

        alt.binaries.pictures.rail,misc.transport.rail.misc

wildmat semantics when applied to a list of newsgroups are to apply the
full expression to each newsgroup separately, and the wildmat matches if
any newsgroup is matched.  Given those semantics, *,!alt.binaries* is
applied to alt.binaries.pictures.rail, where it doesn't match due to the
negated second term, and then to misc.transport.rail, matches it, and the
wildmat expression is considered to match this newsgroups list.

Now consider:

        *, at alt.binaries*

against the same list.  alt.binaries.pictures.rail matches the @ term,
which is "poisoned"; this match will now fail *regardless* of whether the
wildmat expression matches any of the other newsgroups.

@ is primarily used in feed specifications rather than in client wildmat
expressions, and I don't know off-hand if any of the matching code in
nnrpd presently supports it.  I know that a bunch of the stuff in innd
does.

@ has the same positioning rules and precedence as !.  For example, the
expression:

        *, at alt.binaries*,*rail*

would match the above newsgroups list fine, since the match of *rail*
overrides the poisoned match of @alt.binaries* and the match isn't
poisoned.

> 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 ^).

I'd try to stay away from that, as ^ is the standard character for such
purposes and is supported by INN.

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



More information about the ietf-nntp mailing list