Article View: news.software.nntp
Article #27073Use of startup_innd.pl filter
From: Russ Allbery
Date: Sat, 21 Mar 1998 00:00
Date: Sat, 21 Mar 1998 00:00
35 lines
2042 bytes
2042 bytes
When I first looked at the documentation of this, my thought was "cool, I
can save my cache of message IDs and my hash of rejecting MD5 signatures
when the server shuts down and reload them when the server restarts, and I
don't have to lose all my filter history." Then, reading the
documentation, I couldn't find any way to run something before the server
shuts down (with ctlinnd shutdown).
Am I missing something, or is there no way to use this to do what I want?
(I also fail to see the point of filter_after_reload. What does this gain
me over code in filter_innd.pl that isn't inside a sub and therefore runs
when the Perl script is loaded? I currently just have my statistics
dumping code in filter_innd.pl as:
# Since we've just been reloaded, let's write out some statistics.
if (defined $statfile) {
open (FILE, ">$statfile");
print FILE 'MD5 rejects: ' . (scalar keys %md5reject) . "\n";
print FILE 'HDR rejects: ' . (scalar keys %hashreject) . "\n";
print FILE 'MID history: ' . (scalar keys %rejecthistory) . "\n";
print FILE "\nRejecting MD5 hashes:\n";
for (keys %md5reject) { print FILE $md5reject{$_} . ' ' . $_ . "\n" }
print FILE "\nRejecting header hashes:\n";
for (keys %hashreject) { print FILE $hashreject{$_} . ' ' . $_ . "\n" }
close FILE;
}
and it works just fine; it writes out the statistics file every time
filter.perl is reloaded.)
--
Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
Technical Details
Message-ID:
<m367l85nm5.fsf@windlord.Stanford.EDU>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <m367l85nm5.fsf@windlord.Stanford.EDU> Subject: Use of startup_innd.pl filter Date: Sat, 21 Mar 1998 00:00:00 +0000 From: Russ Allbery <rra@stanford.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 336232218 Sender: eagle@windlord.Stanford.EDU Organization: The Eyrie Newsgroups: news.software.nntp