Custom headers
F. Senault
fred.letter at lacave.net
Tue Jun 29 22:37:36 UTC 2004
Wednesday, June 30, 2004, 12:10:55 AM, you wrote:
> Bernt. H wrote:
>> Hello.
>>
>> Is there an "easy" way to add custom headers to all local postings?
>> Like X-Example: test
> Can do in the posting filter. I forget the exact thing you need to set,
> but there's a flag which means "I mean to change the post" and that
> needs to be set before you diddle.
$modify_headers = 1;
I.e, a file named bin/filters/nnrpd_filter.pl, containing :
#! /usr/local/bin/perl
sub filter_post {
$modify_headers=1;
$hdr{'X-Example'}='test';
return '';
}
It's that simple.
> Check the docs, but that's where to look. I haven't done that in a few
> years as you may guess ;-)
And the docs can be found in ~news/doc/hook-perl.
Oh, by the way, I compiled a CURRENT snapshot from today, and it
whined about a "hooks-tck" file in the install phase.
Maybe you'd need something like :
src/inn-CURRENT-20040629/doc> diff -u Makefile Makefile.old
--- Makefile Tue Jun 29 11:52:34 2004
+++ Makefile.old Tue Jun 29 11:52:27 2004
@@ -11,7 +11,7 @@
TOPDOCS = CONTRIBUTORS HACKING INSTALL LICENSE NEWS README TODO
DOCS = GPL compliance-nntp config-design config-semantics config-syntax \
- external-auth history hook-perl hook-python sample-control
+ external-auth history hook-perl hook-python hook-tcl sample-control
DIRS = man
Fred
--
The above also applies to "true" and "false" tests: there can be no
absolute truth, only subjective reality as perceived from an
existentialist paradigm.
(Tanuki in the SDM, on politically-correct coding)
More information about the inn-workers
mailing list