Article View: news.software.nntp
Article #82137Re: Readers behaviour with newsgroups status
From: D. Stussy
Date: Mon, 16 Nov 2009 08:41
Date: Mon, 16 Nov 2009 08:41
285 lines
12588 bytes
12588 bytes
"Julien ΓLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:hdqub3$rre$1@news.trigofacile.com...
> >> If group1 is status "j", group2 is status "=junk" and group3 is status
"y":
> >>
> >> * a local post to group1 will be accepted (and filed into "junk")
whereas
> >> a local post to group2 will not be accepted;
> >>
> >> * a crosspost to group1,group3 will be filed only into only group3
whereas
> >> a crosspost to group2,group3 will be rejected if it is a local post
> >> and filed into "junk" and group3 if it comes from a peer.
> >>
> >> Do you confirm?
> >
> > No.
> >
> > A local post to group 1 (marked "j") will NOT be accepted. "j" = "I do
not
> > carry the group locally but will pass it through using the junk
pseudogroup
> > to any peer that wants it."
>
> Do you really see that behaviour with INN?
>
> I believe you are actually relying on what the man page of the active
file
> mentions about the "j" status. Which is wrongly documented.
1) I assumed that the documented behavior is correct.
2) For groups where I have a specific "j", I have not seen any posts to
them in "junk" that were crossposted (i.e. to groups other than "junk).
Since I compile INN with the local modifications I proposed a while back,
groups marked "j" don't show up in my "LIST ACTIVE" output, and my client
in general takes steps to warn/prevent postings to unknown groups.
Therefore, I haven't tested trying to post directly to a "j" group.
As a result of your query, I picked a group that was marked "j" on my
server and attempted to post to it. My client prevented such. I then
attempted to post to it as a crosspost with my "local.test" group (marked
"y"). A warning did occur, but the post was accepted. When I reviewed the
post via the local group, the "Xref:" header contained ONLY the
"local.test" group's article number, so the cross-posting to "j" did NOT
occur. The "j" group was blocked from local posting.
Newsgroups: buh.shit,local.test
Xref: news.snarked.org local.test:32
buh.shit 0000000000 0000000001 j
local.test 0000000032 0000000001 y
Therefore, I conclude that the behavior is or is equivalent to in result to
what I stated previously.
> For your information, there is an implicit comment in the code source
> for local postings:
>
> case 'j':
> /* Do NOT return an error. */
> break;
>
>
> I also quote what we have for these three other flags (maybe it will
> interest Urs too):
>
> case 'n':
> case 'x':
> if (!PERMaccessconf->locpost)
> snprintf(Error, sizeof(Error),
> "Postings to \"%s\" are not allowed here", p);
> break;
> case '=':
> snprintf(Error, sizeof(Error),
> "The newsgroup \"%s\" has been renamed\n", p);
> break;
>
>
>
> > Peering note: Newsfeeds patterns "!junk" and "@junk", and their
> > difference. A feed specifying "!junk" may pass articles cross-posted
to
> > junk (via "=junk") if the other group(s) pass. A feed specifying
"@junk"
> > should suppress all articles posted or cross-posted to "junk" even if
the
> > other groups pass (subject to the ordering rules for newsfeeds group
> > patterns). Specifying "junk" will pass all non-carried groups that got
> > filed into "junk." Specifying "@*,junk" will pass all articles in junk
NOT
> > cross-posted to another group.
>
> Interesting. Thanks!
>
>
>
> > Pseudogroup "spam"
> > Group-status flag: "s"
> >
> > Similar to the junk group in operation/implementation, except for the
> > "wanttrash" setting. Why a separate group? Because some servers may
want
> > to preserve "junk" as a place to pass non-locally carried groups
through to
> > peers, while designating other groups as spamtraps (only when not
> > cross-posted). The spam group would typically be used in newsfeeds to
feed
> > a program to auto-cancel posts made to spamtrap groups.
> >
> > Groups like "de.alt.0d" which exist purely as spam collectors would
likely
> > be redesignated with status flag "s".
>
> Why not feed de.alt.0d to your auto-cancel program directly from
newsfeeds?
I guess that could also be done, but if there are many spam collecting
groups with no common group-name-elements, the list could get long. Also,
one might not want them in "junk" (so don't mark with a "j"), or to have a
group for them (so don't mark with "y", "m", or "n"), but to receive them,
they can't be marked "x" either. The only remaining status flag
possibility would be "=" (typically "=spam" or "=cancel", which itself
would be marked "x").
It appears that my random thought isn't needed. OK.
Below is my local patch to INN (3 things):
1) Hide all "j" and "=" groups consistently. "x" groups only show when the
highcount is not zero. Only "m", "n", "x", and "y" are presented to
clients.
2) Suppress creating traditional overview files for "j", "x", or "=" which
would typically be empty (zero length files).
3) Create dummy entries in "newsgroups" indicating timestamp a hierarchy's
checkgroups was last processed.
diff -urN nnrpd/commands.c nnrpd/commands.c
--- nnrpd/commands.c 2009-05-21 20:08:33.000000000 +0000
+++ nnrpd/commands.c 2009-10-20 00:00:00.000000000 +0000
@@ -559,8 +559,11 @@
continue;
q++;
key.name = p;
+ if (strchr("=j", *q) != NULL) continue;
if ((gd = bsearch(&key, grouplist, numgroups, sizeof(GROUPDATA),
GroupCompare)) == NULL)
continue;
+ if ((*q == 'x') && !gd->high) continue;
+ if (strchr("ymn", *q) == NULL) *q = 'x';
Printf("%s %lu %lu %s\r\n", p, gd->high, gd->low, q);
numfound--;
}
diff -urN nnrpd/list.c nnrpd/list.c
--- nnrpd/list.c 2009-05-21 20:08:33.000000000 +0000
+++ nnrpd/list.c 2009-10-20 00:00:00.000000000 +0000
@@ -144,10 +144,9 @@
if (!PERMmatch(PERMreadlist, grplist))
return false;
}
- if (OVgroupstats(group, &lo, &hi, &count, &flag) && flag != '=') {
+ if (OVgroupstats(group, &lo, &hi, &count, &flag) && strchr("=j", flag)
!= NULL) {
/* Convert flags to standardized ones, if possible. */
- if (flag == 'j' || flag == 'x')
- flag = 'n';
+ if (strchr("ymn", flag) == NULL) flag = 'x';
/* When a newsgroup is empty, the high water mark should be one
less
* than the low water mark according to RFC 3977. */
if (count == 0)
@@ -315,8 +314,9 @@
/* Convert flags to standardized ones, if possible. */
if ((q = strrchr(p, ' ')) != NULL) {
q++;
- if (*q == 'j' || *q == 'x')
- *q = 'n';
+ if (strchr("=j", *q) != NULL) continue;
+ if (*q == 'x') && !atol(++save)) continue;
+ if (strchr("ymn", *q) == NULL) *q = 'x';
}
}
Printf("%s\r\n", p);
diff -urN storage/tradindexed/tdx-data.c storage/tradindexed/tdx-data.c
--- storage/tradindexed/tdx-data.c 2009-05-21 20:08:33.000000000 +0000
+++ storage/tradindexed/tdx-data.c 2009-10-20 00:00:00.000000000 +0000
@@ -1055,10 +1055,12 @@
/* Check the inode of the index. */
if (data->indexinode != index->indexinode) {
- warn("tradindexed: index inode mismatch for %s: %lu != %lu",
group,
- (unsigned long) data->indexinode,
- (unsigned long) index->indexinode);
- if (fix) {
+ if (index->indexinode) {
+ warn("tradindexed: index inode mismatch for %s: %lu != %lu",
group,
+ (unsigned long) data->indexinode,
+ (unsigned long) index->indexinode);
+ }
+ if (fix || !index->indexinode) {
index->indexinode = data->indexinode;
changed = true;
}
diff -urN storage/tradindexed/tdx-group.c storage/tradindexed/tdx-group.c
--- storage/tradindexed/tdx-group.c 2009-05-21 20:08:33.000000000 +0000
+++ storage/tradindexed/tdx-group.c 2009-10-20 00:00:00.000000000 +0000
@@ -658,10 +658,12 @@
entry->count = 0;
entry->flag = *flag;
data = tdx_data_new(group, index->writable);
- if (!tdx_data_open_files(data))
- warn("tradindexed: unable to create data files for %s", group);
- entry->indexinode = data->indexinode;
- tdx_data_close(data);
+ if (strchr("=jx",*flag) == NULL) {
+ if (!tdx_data_open_files(data))
+ warn("tradindexed: unable to create data files for %s",
group);
+ entry->indexinode = data->indexinode;
+ tdx_data_close(data);
+ }
index_add(index, entry);
index_lock(index->fd, INN_LOCK_UNLOCK);
@@ -765,8 +767,10 @@
index_lock_group(index->fd, offset, INN_LOCK_UNLOCK);
goto fail;
}
- if (entry->indexinode != data->indexinode)
- warn("tradindexed: index inode mismatch for %s", group);
+ if (entry->indexinode != data->indexinode) {
+ if (!entry->indexinode) entry->indexinode = data->indexinode;
+ else warn("tradindexed: index inode mismatch for %s", group);
+ }
high = entry->high;
base = entry->base;
index_lock_group(index->fd, offset, INN_LOCK_UNLOCK);
@@ -805,9 +809,11 @@
if (entry->indexinode != data->indexinode) {
if (!tdx_data_open_files(data))
goto fail;
- if (entry->indexinode != data->indexinode)
- warn("tradindexed: index inode mismatch for %s",
+ if (entry->indexinode != data->indexinode) {
+ if (!entry->indexinode) entry->indexinode = data->indexinode;
+ else warn("tradindexed: index inode mismatch for %s",
HashToText(entry->hash));
+ }
data->base = entry->base;
}
@@ -919,6 +925,11 @@
tdx_index_close(index);
return false;
}
+
+ if (low != NULL) *low = 0;
+ if (!entry->indexinode) return true;
+ /* Since there was no inode for this group, there was nothing to do!
*/
+
tdx_index_rebuild_start(index, entry);
/* tdx_data_expire_start builds the new IDX and DAT files and fills in
the
diff -urN control/docheckgroups.in control/docheckgroups.in
--- control/docheckgroups.in 2009-10-12 18:24:04.000000000 +0000
+++ control/docheckgroups.in 2009-10-20 00:00:00.000000000 +0000
@@ -79,6 +79,9 @@
${AWK} '{ if ($1 !~ /'"${PATS}"'/) { print $0 } }' ${NEWSGROUPS}
>${T}/$$updatednewsgroups
${AWK} '{ if (($1 !~ /'"${1:-.}"'/) && ($1 ~ /'"${PATS}"'/)) { print
$0 } }' ${NEWSGROUPS} >>${T}/$$updatednewsgroups
cat ${T}/$$newdesc >>${T}/$$updatednewsgroups
+ DATE=`date --utc "+%Y-%m-%d %H:%M:%S UTC"`
+ for x in `grep "\." ${T}/$$msg|cut -d . -f 1|sort -u` ; do
+ echo -e $x.CHECKGROUPS\\tCheckgroups processed on $DATE
>>${T}/$$updatednewsgroups ; done
mv -f ${NEWSGROUPS} ${NEWSGROUPS}.old
${SORT} ${T}/$$updatednewsgroups | ${SED} 's/ [ ]*/ /'
\
| ${AWK} -F'\t' '{if (length($1) < 8) {print $1"\t\t\t"$2} \
Technical Details
Message-ID:
<hdr37g$nl8$1@snarked.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!xlned.com!feeder1.xlned.com!news.alt.net!news-xfer.nntp.sonic.net!news.snarked.org!not-for-mailReferences:
<hdkrlm$mve$1@news.trigofacile.com> <hdm006$b65$1@news2.rz.uni-karlsruhe.de> <hdm6lp$3n4$1@news.trigofacile.com> <hdno49$ohu$1@snarked.org> <hdphsq$d58$1@news.trigofacile.com> <hdq40h$dqm$1@snarked.org> <hdqub3$rre$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <hdr37g$nl8$1@snarked.org> Subject: Re: Readers behaviour with newsgroups status Date: Mon, 16 Nov 2009 00:41:12 -0800 From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org> References: <hdkrlm$mve$1@news.trigofacile.com> <hdm006$b65$1@news2.rz.uni-karlsruhe.de> <hdm6lp$3n4$1@news.trigofacile.com> <hdno49$ohu$1@snarked.org> <hdphsq$d58$1@news.trigofacile.com> <hdq40h$dqm$1@snarked.org> <hdqub3$rre$1@news.trigofacile.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!xlned.com!feeder1.xlned.com!news.alt.net!news-xfer.nntp.sonic.net!news.snarked.org!not-for-mail Newsgroups: news.software.nntp,news.software.readers Lines: 285 Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org> NNTP-Posting-Host: pool-71-118-49-43.lsanca.dsl-w.verizon.net X-Trace: snarked.org 1258360880 24232 71.118.49.43 (16 Nov 2009 08:41:20 GMT) X-Complaints-To: newsmaster@snarked.org NNTP-Posting-Date: Mon, 16 Nov 2009 08:41:20 +0000 (UTC) X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478