INN commit: trunk (3 files)

INN Commit rra at isc.org
Sun Jul 10 19:31:51 UTC 2011


    Date: Sunday, July 10, 2011 @ 12:31:50
  Author: iulius
Revision: 9234

check of global values vs per-peer values in innfeed.conf

* As no keys are actually required in innfeed.conf, update inncheck
accordingly.

* Update inncheck, the man page and the innfeed.conf sample file to correctly
mention that deliver-* keys for imapfeed must be specified at global scope.

* initial-sleep is a global value; close-period is a per-peer value.
Update inncheck accordingly.

Modified:
  trunk/doc/pod/innfeed.conf.pod
  trunk/samples/innfeed.conf
  trunk/scripts/inncheck.in

--------------------------+
 doc/pod/innfeed.conf.pod |   80 ++++++++++++++++++++++----------------------
 samples/innfeed.conf     |   14 +++++--
 scripts/inncheck.in      |   81 ++++++++++++++++++++-------------------------
 3 files changed, 86 insertions(+), 89 deletions(-)

Modified: doc/pod/innfeed.conf.pod
===================================================================
--- doc/pod/innfeed.conf.pod	2011-07-09 19:17:21 UTC (rev 9233)
+++ doc/pod/innfeed.conf.pod	2011-07-10 19:31:50 UTC (rev 9234)
@@ -313,6 +313,46 @@
 
 =back
 
+=head2 Special keys for B<imapfeed>
+
+The following keys are used with B<imapfeed> to authenticate to a remote
+host.  Several parameters may be included at global scope:
+
+=over 4
+
+=item I<deliver-authname>
+
+The authname is who you want to authenticate as.
+
+=item I<deliver-password>
+
+This is the appropriate password for authname.
+
+=item I<deliver-username>
+
+The username is who you want to "act" as, that is, who is actually going
+to be using the server.
+
+=item I<deliver-realm>
+
+In this case, the "realm" is the realm in which the specified authname
+is valid.  Currently this is only needed by the DIGEST-MD5 SASL mechanism.
+
+=item I<deliver-rcpt-to>
+
+A printf(3)-style format string for creating the envelope recipient address.
+The pattern MUST include a single string specifier which will be replaced
+with the newgroup (e.g. C<bb+%s>).  The default is C<+%s>.
+
+=item I<deliver-to-header>
+
+An optional printf(3)-style format string for creating a To: header field
+to be prepended to the article.  The pattern MUST include a single string
+specifier which will be replaced with the newgroup (e.g. C<post+%s at domain>).
+If not specified, the To: header field will not be prepended.
+
+=back
+
 =head1 GLOBAL PEER DEFAULTS
 
 All the I<key>:I<value> pairs mentioned in this section can be specified at
@@ -627,46 +667,6 @@
 
 =back
 
-=head2 Special keys for B<imapfeed>
-
-The following keys are used with B<imapfeed> to authenticate to a remote
-host.  Several parameters may be included:
-
-=over 4
-
-=item I<deliver-authname>
-
-The authname is who you want to authenticate as.
-
-=item I<deliver-password>
-
-This is the appropriate password for authname.
-
-=item I<deliver-username>
-
-The username is who you want to "act" as, that is, who is actually going
-to be using the server.
-
-=item I<deliver-realm>
-
-In this case, the "realm" is the realm in which the specified authname
-is valid.  Currently this is only needed by the DIGEST-MD5 SASL mechanism.
-
-=item I<deliver-rcpt-to>
-
-A printf(3)-style format string for creating the envelope recipient address.
-The pattern MUST include a single string specifier which will be replaced
-with the newgroup (e.g. C<bb+%s>).  The default is C<+%s>.
-
-=item I<deliver-to-header>
-
-An optional printf(3)-style format string for creating a To: header field
-to be prepended to the article.  The pattern MUST include a single string
-specifier which will be replaced with the newgroup (e.g. C<post+%s at domain>).
-If not specified, the To: header field will not be prepended.
-
-=back
-
 =head1 PEER VALUES
 
 As previously explained, the peer definitions can contain redefinitions

Modified: samples/innfeed.conf
===================================================================
--- samples/innfeed.conf	2011-07-09 19:17:21 UTC (rev 9233)
+++ samples/innfeed.conf	2011-07-10 19:31:50 UTC (rev 9234)
@@ -117,9 +117,13 @@
 #        username:              john
 #        password:              myPassword
 #    }
-#
-#    # If imapfeed is used, the following parameters can
-#    # be set for a peer:
-#    #     deliver-authname, deliver-password, deliver-username,
-#    #     deliver-realm, deliver-rcpt-to, deliver-to-header.
 #}
+
+
+##  For imapfeed.
+
+# If imapfeed is used, the following parameters can
+# be set at global scope:
+#     deliver-authname, deliver-password, deliver-username,
+#     deliver-realm, deliver-rcpt-to, deliver-to-header.
+

Modified: scripts/inncheck.in
===================================================================
--- scripts/inncheck.in	2011-07-09 19:17:21 UTC (rev 9233)
+++ scripts/inncheck.in	2011-07-10 19:31:50 UTC (rev 9234)
@@ -552,50 +552,44 @@
 sub
 innfeed_conf
 {
-    my %required_globals = ( # allowed anywhere, but have to exist in global scope
-        'article-timeout'       => 'number',
-        'response-timeout'      => 'number',
-        'initial-sleep'         => 'number',
-        'initial-connections'   => 'number',
-        'max-connections'       => 'number',
-        'dynamic-method'        => 'number',
-        'dynamic-backlog-low'   => 'floating-point number (0.0-100.0)',
-        'dynamic-backlog-high'  => 'floating-point number (0.0-100.0)',
-        'dynamic-backlog-filter'=> 'floating-point number',
-        'max-queue-size'        => 'number',
-        'streaming'             => 'boolean',
-        'no-check-high'         => 'floating-point number (0.0-100.0)',
-        'no-check-low'          => 'floating-point number (0.0-100.0)',
-        'no-check-filter'       => 'floating-point number',
-        'bindaddress'           => 'IPv4 address / "any / "none"',
-        'bindaddress6'          => 'IPv6 address / "any / "none"',
-        'port-number'           => 'number',
-        'force-ipv4'            => 'boolean',
-        'drop-deferred'         => 'boolean',
-        'min-queue-connection'  => 'boolean',
-        'no-backlog'            => 'boolean',
-        'backlog-limit'         => 'number',
-        'backlog-factor'        => 'floating-point number',
-        'backlog-limit-highwater' => 'number',
-        'backlog-feed-first'    => 'boolean',
-        'username'              => 'string',
-        'password'              => 'string',
-        'deliver-authname'      => 'string',
-        'deliver-password'      => 'string',
-        'deliver-username'      => 'string',
-        'deliver-realm'         => 'string',
-        'deliver-rcpt-to'       => 'string',
-        'deliver-to-header'     => 'string',
-    );
     my %groups = parse_config(
         {
-            '<anywhere>'  => \%required_globals,
-            '<global scope>'    => {    # not required, defaults exist
+            '<anywhere>'        => {
+                'article-timeout'       => 'number',
+                'response-timeout'      => 'number',
+                'initial-connections'   => 'number',
+                'max-connections'       => 'number',
+                'close-period'          => 'number',
+                'dynamic-method'        => 'number',
+                'dynamic-backlog-low'   => 'floating-point number (0.0-100.0)',
+                'dynamic-backlog-high'  => 'floating-point number (0.0-100.0)',
+                'dynamic-backlog-filter'=> 'floating-point number',
+                'max-queue-size'        => 'number',
+                'streaming'             => 'boolean',
+                'no-check-high'         => 'floating-point number (0.0-100.0)',
+                'no-check-low'          => 'floating-point number (0.0-100.0)',
+                'no-check-filter'       => 'floating-point number',
+                'bindaddress'           => 'IPv4 address / "any / "none"',
+                'bindaddress6'          => 'IPv6 address / "any / "none"',
+                'port-number'           => 'number',
+                'force-ipv4'            => 'boolean',
+                'drop-deferred'         => 'boolean',
+                'min-queue-connection'  => 'boolean',
+                'no-backlog'            => 'boolean',
+                'backlog-limit'         => 'number',
+                'backlog-factor'        => 'floating-point number',
+                'backlog-limit-highwater' => 'number',
+                'backlog-feed-first'    => 'boolean',
+                'username'              => 'string',
+                'password'              => 'string',
+            },
+            '<global scope>'    => {
                 'news-spool'            => 'path',
                 'input-file'            => 'path',
                 'pid-file'              => 'path',
                 'debug-level'           => 'number',
                 'debug-shrinking'       => 'boolean',
+                'initial-sleep'         => 'number',
                 'fast-exit'             => 'boolean',
                 'use-mmap'              => 'boolean',
                 'log-file'              => 'path',
@@ -607,7 +601,6 @@
                 'backlog-rotate-period' => 'number',
                 'dns-retry'             => 'number',
                 'dns-expire'            => 'number',
-                'close-period'          => 'number',
                 'gen-html'              => 'boolean',
                 'status-file'           => 'path',
                 'connection-stats'      => 'boolean',
@@ -617,6 +610,12 @@
                 'initial-reconnect-time'=> 'number',
                 'max-reconnect-time'    => 'number',
                 'stdio-fdmax'           => 'number',
+                'deliver-authname'      => 'string',
+                'deliver-password'      => 'string',
+                'deliver-username'      => 'string',
+                'deliver-realm'         => 'string',
+                'deliver-rcpt-to'       => 'string',
+                'deliver-to-header'     => 'string',
             },
             'group'             => {},
             'peer'              => {
@@ -625,12 +624,6 @@
             '<include>'         => { '$INCLUDE' => 'ignore' },
         }
     );
-    # check presence of required keys in global scope
-    foreach (keys %required_globals) {
-        next if /bindaddress|bindaddress6|username|password|deliver/; # not required
-        eprint "$file: required key $_ not defined in global scope.\n"
-            unless defined $groups{'<global scope>'}->{$_};
-    }
     # check some numeric values
     foreach my $group (keys %groups) {
         eprint "$file:$groups{$group}->{'type'} $groups{$group}->{'name'}: dynamic-method must be between 0 and 3\n"




More information about the inn-committers mailing list