about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/Config.pm2
-rw-r--r--t/config.t6
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm
index 55019e9f..28b5bdb5 100644
--- a/lib/PublicInbox/Config.pm
+++ b/lib/PublicInbox/Config.pm
@@ -136,7 +136,7 @@ sub _fill {
 
         foreach my $k (qw(mainrepo address filter url newsgroup
                         infourl watch watchheader httpbackendmax
-                        feedmax)) {
+                        feedmax nntpserver)) {
                 my $v = $self->{"$pfx.$k"};
                 $rv->{$k} = $v if defined $v;
         }
diff --git a/t/config.t b/t/config.t
index 040e9fb2..3ba61119 100644
--- a/t/config.t
+++ b/t/config.t
@@ -78,6 +78,12 @@ my $tmpdir = tempdir('pi-config-XXXXXX', TMPDIR => 1, CLEANUP => 1);
         my $cfg = PublicInbox::Config->new(\%tmp);
         my $ibx = $cfg->lookup_name('test');
         is($ibx->{nntpserver}, 'news.example.com', 'global NNTP server');
+
+        delete $h{'publicinbox.nntpserver'};
+        $h{"$pfx.nntpserver"} = 'news.alt.example.com';
+        $cfg = PublicInbox::Config->new(\%h);
+        $ibx = $cfg->lookup_name('test');
+        is($ibx->{nntpserver}, 'news.alt.example.com','per-inbox NNTP server');
 }
 
 done_testing();