perl filter problem

Wozniak Radoslaw rwozniak at CASTLE.POLAND.COM
Tue Aug 21 12:43:00 UTC 2001


Hello

I have problem with filter_nnrpd.pl.
In example file have text

# This file is loaded when nnrpd starts up. If it defines a sub named
# `filter_post', then that function will be called during processing of a
# posting. It has access to the headers of the article via the associative
# array `%hdr'. If it returns a null string then the article is accepted
# for posting. A non-null stringrejects it, and the value returned is used
# in the rejection message.
#

#
#  %hdr = (Subject      => 'MAKE MONEY FAST!!',
#                    From         => 'Joe Spamer <him at example.com>',
#                    Date         => '10 Sep 1996 15:32:28 UTC',
#                    Newsgroups   => 'alt.test',
#                    Path         => 'news.example.com!not-for-mail',
#                    Organization => 'Spammers Anonymous',
#                    Lines        => '5',
#                    Distribution => 'usa',
#                    'Message-ID' => '<6.20232.842369548 at example.com>',
#                    __BODY__     => 'Send five dollars to the ISC, c/o
...',
#                    __LINES__    => 5
#            );
#

in this example test %hdr array NEVER GIVE $hdr{'__BODY__'} value.
Im modify filter_nnrpd.pl and cut 6 lines.

open (LOG,"+>>/usr/local/news/bin/filter/log");
print LOG "####################################################\n";
@keys = keys %hdr;
foreach (@keys) { print LOG "$_\n"; };
print LOG "\n\n";
close(LOG);

and server sets only this values

Distribution
Content-Transfer-Encoding
X-Accept-Language
Content-Type
Path
X-Complaints-To
Subject
From
X-Trace
Lines
Mime-Version
NNTP-Posting-Host
NNTP-Posting-Date
Newsgroups
Date
Message-ID
X-Mailer



__BODY__ and __LINES__ never exist !

How check (in perl script) message body !


Radek


More information about the inn-workers mailing list