INN commit: branches/2.5 (6 files)
INN Commit
rra at isc.org
Fri Jan 22 23:32:22 UTC 2010
Date: Friday, January 22, 2010 @ 15:32:22
Author: iulius
Revision: 8920
A new check has been added to newsfeeds entries: "Aj", when present,
adds the capability to feed articles accepted and filed in "junk" (due
to wanttrash) to peers based on their newsfeeds feed patterns applied to
the Newsgroups: header as though the article were accepted and all those
groups were locally carried. This is useful if you want to run INN with
a minimal active file and propagate all posts.
Thanks to Andrew Gierth for the patch.
Modified:
branches/2.5/doc/pod/active.pod
branches/2.5/doc/pod/inn.conf.pod
branches/2.5/doc/pod/newsfeeds.pod
branches/2.5/innd/art.c
branches/2.5/innd/innd.h
branches/2.5/innd/newsfeeds.c
-----------------------+
doc/pod/active.pod | 6 +++---
doc/pod/inn.conf.pod | 3 ++-
doc/pod/newsfeeds.pod | 29 ++++++++++++++++++++---------
innd/art.c | 19 ++++++++++++++-----
innd/innd.h | 1 +
innd/newsfeeds.c | 2 ++
6 files changed, 42 insertions(+), 18 deletions(-)
Modified: doc/pod/active.pod
===================================================================
--- doc/pod/active.pod 2010-01-22 23:29:28 UTC (rev 8919)
+++ doc/pod/active.pod 2010-01-22 23:32:22 UTC (rev 8920)
@@ -25,9 +25,9 @@
If none of the newsgroups listed in the Newsgroups: header of an article
are present in this file, the article is either rejected (if I<wanttrash>
-is false in F<inn.conf>), or is filed into the newsgroup C<junk> and only
-propagated to sites that receive the C<junk> newsgroup (if I<wanttrash> is
-true).
+is false in F<inn.conf>), or is filed into the newsgroup C<junk> and,
+when C<Aj> is not set in the F<newsfeeds> feed pattern, only propagated
+to sites that receive the C<junk> newsgroup (if I<wanttrash> is true).
Each line of this file consists of four fields separated by a space:
Modified: doc/pod/inn.conf.pod
===================================================================
--- doc/pod/inn.conf.pod 2010-01-22 23:29:28 UTC (rev 8919)
+++ doc/pod/inn.conf.pod 2010-01-22 23:32:22 UTC (rev 8920)
@@ -337,7 +337,8 @@
Set this to true if you want to file articles posted to unknown newsgroups
(newsgroups not in the F<active> file) into the C<junk> newsgroup rather
than rejecting them. This is sometimes useful for a transit news server
-that needs to propagate articles in all newsgroups regardless if they're
+that needs to propagate articles (according to the setting of C<Aj> in
+the F<newsfeeds> feed pattern) in all newsgroups regardless if they're
carried locally. This is a boolean value and the default is false.
=item I<wipcheck>
Modified: doc/pod/newsfeeds.pod
===================================================================
--- doc/pod/newsfeeds.pod 2010-01-22 23:29:28 UTC (rev 8919)
+++ doc/pod/newsfeeds.pod 2010-01-22 23:32:22 UTC (rev 8920)
@@ -124,10 +124,9 @@
Control messages follow slightly different propagation rules than normal
articles; see innd(8) for the details. Note that most subscriptions
should have C<!junk,!control,!control.*> in their pattern list due to those
-propagation rules (and since junk is a special internal newsgroup; see
-I<wanttrash> in inn.conf(5) for more details on what it's used for) and
-that the best way to keep control messages local to a site is with a
-distribution.
+propagation rules (and since C<junk> is a special internal newsgroup; see
+I<wanttrash> in inn.conf(5) for more details on what it's used for) and that
+the best way to keep control messages local to a site is with a distribution.
A subscription can be further modified by specifying distributions that
the site should or should not receive. The default is to send all
@@ -269,7 +268,7 @@
=item d
-Only send articles with a Distribution header. Combined with a particular
+Only send articles with a Distribution: header. Combined with a particular
distribution value in the I<distribution> part of the site entry, this can
be used to limit articles sent to a site to just those with a particuliar
distribution.
@@ -277,15 +276,27 @@
=item e
Only send articles where every newsgroup listed in the Newsgroups: header
-exists in the active file.
+exists in the F<active> file.
=item f
Don't send articles rejected by filters. This is only useful when
-I<dontrejectfiltered> is set in F<inn.conf>. With that variable set, this
-lets one accept all articles but not propagate filtered ones to some
-sites.
+I<dontrejectfiltered> is set to true in F<inn.conf>. With that variable
+set, this lets one accept all articles but not propagate filtered ones to
+some sites.
+=item j
+
+Propagate articles according to their Newsgroups: header. This is only
+useful when I<wanttrash> is set to true in F<inn.conf>. With that variable
+set, articles accepted and filed in C<junk> (due to I<wanttrash>) are fed to
+peers based on their subscription pattern applied to the Newsgroups: header
+as though they were accepted and all those groups were locally carried.
+Otherwise, they are propagated to sites that receive the C<junk> newsgroup.
+
+This variable is useful if you want to run INN with a minimal F<active>
+file and propagate all posts.
+
=item o
Only send articles for which overview data was stored.
Modified: innd/art.c
===================================================================
--- innd/art.c 2010-01-22 23:29:28 UTC (rev 8919)
+++ innd/art.c 2010-01-22 23:32:22 UTC (rev 8920)
@@ -1367,17 +1367,17 @@
}
/*
-** Send the current article to all sites that would get it if the
-** group were created.
+** Send the current article to all sites that would get it (used
+** for instance to propagate newgroup control articles or junk articles).
*/
static void
-ARTsendthegroup(char *name)
+ARTsendthegroup(char *name, char *fromgroup)
{
SITE *sp;
int i;
NEWSGROUP *ngp;
- for (ngp = NGfind(ARTctl), sp = Sites, i = nSites; --i >= 0; sp++) {
+ for (ngp = NGfind(fromgroup), sp = Sites, i = nSites; --i >= 0; sp++) {
if (sp->Name != NULL && SITEwantsgroup(sp, name)) {
SITEmark(sp, ngp);
}
@@ -2232,8 +2232,17 @@
* removed (or to the admin group to which the checkgroups is posted),
* and send it to all sites that would or would have had the group
* if it were created. */
- ARTsendthegroup(*groups);
+ ARTsendthegroup(*groups, ARTctl);
Accepted = true;
+ } else if (innconf->wanttrash && !innconf->verifygroups) {
+ /* Don't set Accepted in this case, because we may still end
+ * up filing the article in the junk group. */
+ for (ngp = NGfind(ARTjnk), sp = Sites, i = nSites; --i >= 0; sp++) {
+ if (sp->Name != NULL && sp->FeedTrash && SITEwantsgroup(sp, *groups)) {
+ SITEmark(sp, ngp);
+ }
+ }
+ NonExist = true;
} else {
NonExist = true;
/* Check if all the newsgroups listed in the Newsgroups: header of
Modified: innd/innd.h
===================================================================
--- innd/innd.h 2010-01-22 23:29:28 UTC (rev 8919)
+++ innd/innd.h 2010-01-22 23:32:22 UTC (rev 8920)
@@ -486,6 +486,7 @@
bool NeedOverviewCreation;
bool FeedwithoutOriginator;
bool DropFiltered;
+ bool FeedTrash;
int Hops;
int Groupcount;
int Followcount;
Modified: innd/newsfeeds.c
===================================================================
--- innd/newsfeeds.c 2010-01-22 23:29:28 UTC (rev 8919)
+++ innd/newsfeeds.c 2010-01-22 23:32:22 UTC (rev 8920)
@@ -468,6 +468,7 @@
sp->NeedOverviewCreation = false;
sp->FeedwithoutOriginator = false;
sp->DropFiltered = false;
+ sp->FeedTrash = false;
sp->HashFeedList = NULL;
/* Nip off the first field, the site name. */
@@ -540,6 +541,7 @@
case 'd': sp->DistRequired = true; break;
case 'e': sp->DontWantNonExist = true; break;
case 'f': sp->DropFiltered = true; break;
+ case 'j': sp->FeedTrash = true; break;
case 'o': sp->NeedOverviewCreation = true; break;
case 'O': sp->FeedwithoutOriginator = true; break;
case 'p': sp->IgnorePath = true; break;
More information about the inn-committers
mailing list