changing incoming Subject: headers?
Jeffrey M. Vinocur
jeff at litech.org
Wed Apr 17 20:44:34 UTC 2002
On Wed, 17 Apr 2002, Scott Russell wrote:
> I see with inn 2.3.2 I can use perl filters to do things. Is it possible to
> strip out some contents of the Subject: header before it's posted to the
> group?
Sure (and doing what you describe with a regular expression in Perl would
be quite easy). Read the README.perl_hook file in your source tree.
Particularly:
Unlike the innd Perl filter, the nnrpd Perl filter can modify the %hdr
hash. In fact, if the Perl variable $modify_headers is set to true
after filter_post() returns, the contents of the %hdr hash will be
written back to the article replacing the original headers.
filter_post() can therefore make any modifications it wishes to the
headers and those modifications will be reflected in the article as it's
finally posted. The article body cannot be modified in this way; any
changes to $body will just be ignored.
--
Jeffrey M. Vinocur
jeff at litech.org
More information about the inn-workers
mailing list