[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Wildcard lists
From: ####@####.#### Date: 15 Jan 2004 09:13:14 -0000 Message-Id: <OF92057D40.4C6ECF33-ONC1256E1C.002ED3F6@csi.it> Hi everybody. I use NewsCache since the 0.99.17 release. I have recently upgraded to the newest releases. I tested both stable and development versions but I still have a problem with wildcards in newscache.conf. In my conf file I have this server configuration: Server news.xxx.yy nntp { Retries 3 Read *,!it.*,!alt.* PostTo *,!it.*,!alt.* GroupTimeout 150 Options cached Commands not-over } I want to fetch from this server all newsgroups, without it.* and alt.* hierarchies but in my active list I find all newsgroups, including it.* and alt.*. Using this line: Read *,!it.* it works fine, I get all groups, except it.* but if I have more than one exclusion in wildcard line it works like a Read * The multiple exclusion in the very old NewsCache 0.99.17 works fine. Anybody has a hint? Bye Marco Restani | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: Wildcard lists
From: Herbert Straub ####@####.#### Date: 15 Jan 2004 11:21:59 -0000 Message-Id: <400670CA.8020109@aon.at> ####@####.#### wrote: >Hi everybody. >I use NewsCache since the 0.99.17 release. I have recently upgraded to the >newest releases. I tested both stable and development versions but I still >have a problem with wildcards in newscache.conf. >In my conf file I have this server configuration: > >Server news.xxx.yy nntp { > Retries 3 > Read *,!it.*,!alt.* > PostTo *,!it.*,!alt.* > GroupTimeout 150 > Options cached > Commands not-over > } > >I want to fetch from this server all newsgroups, without it.* and alt.* >hierarchies but in my active list I find all newsgroups, including it.* and >alt.*. > The man page newscache.conf doesn't describe the real situation with the Server configuration parameters. I found this at the same time as Konstantin Nikonenko sends his regular expression patch one month ago. I think, this can't work, because the NewsCache send a list active command to his upstream NewsServer (he split the Read Parameter by "," and sends one command per part. Example: list active * list active !it.* list active !alt.* You can find this in the /var/log/news/news.debug file (other example): Jan 15 11:32:31 test NewsCache[18721]: CServer::active: active database timed out Jan 15 11:32:31 test NewsCache[18721]: RServer::active() Jan 15 11:32:31 test NewsCache[18721]: RServer::setserver({news.wienkav.at,nntp}) Jan 15 11:32:31 test NewsCache[18721]: RServer::connect() Jan 15 11:32:31 test NewsCache[18721]: RServer::connect: Connecting to up.stream.newsserver from DEFAULT inte rface to servicename nntp Jan 15 11:32:31 test NewsCache[18721]: sstream::connectTo connecting to up.stream.newsserver service nntp Jan 15 11:32:31 test NewsCache[18721]: 200 NewsCache 1.1.91, accepting NNRP commands Jan 15 11:32:31 test NewsCache[18721]: RServer::issue: issue mode reader Jan 15 11:32:31 test NewsCache[18721]: RServer::issue: issue list overview.fmt Jan 15 11:32:31 test NewsCache[18721]: RServer::issue: issue list active * Jan 15 11:32:31 test NewsCache[18721]: NVActiveDB::read(&is,*filter,flags) Jan 15 11:32:31 test NewsCache[18721]: RServer::issue: issue list active !it.* Jan 15 11:32:31 test NewsCache[18721]: NVActiveDB::read(&is,*filter,flags) OK, and try this commands in a telnet session! In the version 1.1.92 the man page contains for this parameter: Read NewsgroupList The comma separated list specifiy the wildmat newsgroup specifications. Each element of the list will be fetched with the list active element. Example: Read at.*,de.* will send to the upstream newsserver the following two commands: list active at.* and list active de.*. For details see section 2.1.2 LIST ACTIVE [WILDMAT]. These parameter can help you saving bandwidth. AccessSpec Configuration Options . No default value. And now zless ../doc/rfc2980.txt.gz 2.1.2 LIST ACTIVE LIST ACTIVE [wildmat] LIST ACTIVE is exactly the same as the LIST command specified in RFC 977. The responses and the format should exactly match the LIST command without arguments. If the optional matching parameter is specified, the list is limited to only the groups that match the pattern. Specifying a single group is usually very efficient for the server, and multiple groups may be specified by using wildmat patterns (described later in this document), not regular expressions. If nothing is matched an empty list is returned, not an error. This command first appeared in the UNIX reference version. and 3.3 The WILDMAT format The WILDMAT format was first developed by Rich Salz based on the format used in the UNIX "find" command to articulate file names. It was developed to provide a uniform mechanism for matching patterns in the same manner that the UNIX shell matches filenames. Patterns are implicitly anchored at the beginning and end of each string when testing for a match. There are five pattern matching operations other than a strict one-to-one match between the pattern and the source to be checked for a match. The first is an asterisk (*) to match any sequence of zero or more characters. The second is a question mark (?) to match any single character. The third specifies a specific set of characters. The set is specified as a list of characters, or as a range of characters where the beginning and end of the range are separated by a minus (or dash) character, or as any combination of lists and ranges. The dash can also be included in the set as a character it if is the beginning or end of the set. This set is enclosed in square brackets. The close square bracket (]) may be used in a set if it is the first character in the set. The fourth operation is the same as the logical not of the third operation and is specified the same way as the third with the addition of a caret character (^) at the beginning of the test string just inside the open square bracket. The final operation uses the backslash character to invalidate the special meaning of the a open square bracket ([), the asterisk, backslash or the question mark. Two backslashes in sequence will result in the evaluation of the backslash as a character with no special meaning. 3.3.1 Examples a. [^]-] -- matches any single character other than a close square bracket or a minus sign/dash. b. *bdc -- matches any string that ends with the string "bdc" including the string "bdc" (without quotes). c. [0-9a-zA-Z] -- matches any single printable alphanumeric ASCII character. d. a??d -- matches any four character string which begins with a and ends with d. If you would wipe out the newsgroup lists for a user, then you have to specify this in the AccessSpec section. And in the AccessList section the regular expression patch from Konstatin is very usefull, but we need more development work to do this. The Server Read option is usefull, if you combine multiple upstream server. Here you can specifiy, which Newsgroup is taken from a specific server. But attention: The PostTo works only with the primary server at the moment: man newscache.conf (1.1.92): PostTo NGSpecification This function is not implemented at the moment. NewsCache post an article to the primary news server. The primary news server is the news server being listed first. If the arti- cle cannot be submitted immediately, it is kept for later transmission. Any suggestions? > >Using this line: > >Read *,!it.* > >it works fine, I get all groups, except it.* but if I have more than one >exclusion in wildcard line it works like a Read * > >The multiple exclusion in the very old NewsCache 0.99.17 works f > Are you sure? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |