postfilter doesn't work with inn 2.5 but it fully works with 2.4. Same
version, same librariesm same files: with INN 2.4 it works, with inn 2.5 i
find in my logs entries like these:
Nov 29 16:17:25 aioe-casa nnrpd[5386]: SERVER perl filter not defined
any idea to help me?
btw neither postfilter 0.7.6 nor 0.6.2 works with inn 2.5 (and i'm sure that
nnrpd was compiled with perl support and postfilter requirements are fully
satisfacted).
news.debug doesn't help
> Nov 29 16:17:25 aioe-casa nnrpd[5386]: SERVER perl filter not defined
>
> any idea to help me?
It means that nnrpd couldn't load <pathfilter>/filter_nnrpd.pl
(either it has syntax errors or the filter_post() function could not be
found).
Note that INN::Config should be used instead of innshellvars.pl
(though it should still work with innshellvars.pl...).
I do not know why postfilter would not work with INN 2.5 while it works
with INN 2.4 :-/
--
Julien �LIE
� -- Il est parti comme il est venu...
-- Il ne faisait que passer... � (Ast�rix)
> It means that nnrpd couldn't load <pathfilter>/filter_nnrpd.pl
/etc/news/filter# tree -spug
.
|-- [-rw-r--r-- root root 6167] filter_innd.pl
|-- [-rw-r--r-- root root 2259] filter_nnrpd-backup.pl
|-- [lrwxrwxrwx root root 24] filter_nnrpd.pl ->
postfilter/postfilter.pl
|-- [-rw-r--r-- root root 4192] nnrpd_access.pl
|-- [-rw-r--r-- root root 2692] nnrpd_auth.pl
|-- [drwxr-xr-x news news 128] postfilter
| |-- [drwxr-xr-x news news 104] data
| | `-- [-rw-r--r-- news news 15107] two-level-tlds
| |-- [drwxr-xr-x news news 312] modules
| | |-- [-rw-r--r-- news news 9829] access.pm
| | |-- [-rw-r--r-- news news 13217] banchecks.pm
| | |-- [-rw-r--r-- news news 1402] custom.pm
| | |-- [-rw-r--r-- news news 5390] exit.pm
| | |-- [-rw-r--r-- news news 1153] legal.pm
| | |-- [-rw-r--r-- news news 6194] mysql.pm
| | |-- [-rw-r--r-- news news 9989] other.pm
| | |-- [-rw-r--r-- news news 10769] rbl.pm
| | `-- [-rw-r--r-- news news 23633] style.pm
| `-- [-rw-r--r-- news news 14398] postfilter.pl
`-- [-rw-r--r-- root root 1326] startup_innd.pl
3 directories, 17 files
hard links also don't work
> (either it has syntax errors or the filter_post() function could not be
> found).
# perl -wc filter_nnrpd.pl
filter_nnrpd.pl syntax OK
# perl -wc modules/access.pm
modules/access.pm syntax OK
# perl -wc modules/banchecks.pm
modules/banchecks.pm syntax OK
# perl -wc modules/custom.pm
modules/custom.pm syntax OK
# perl -wc modules/exit.pm
modules/exit.pm syntax OK
# perl -wc modules/legal.pm
modules/legal.pm syntax OK
# perl -wc modules/mysql.pm
modules/mysql.pm syntax OK
# perl -wc modules/other.pm
modules/other.pm syntax OK
# perl -wc modules/rbl.pm
modules/rbl.pm syntax OK
# perl -wc modules/style.pm
modules/style.pm syntax OK
this doesn't seem a so simple trouble
>
> Note that INN::Config should be used instead of innshellvars.pl
> (though it should still work with innshellvars.pl...).
now i need to understand why postfilter doesn't work with inn 2.5
> now i need to understand why postfilter doesn't work with inn 2.5
Dec 2 23:24:10 news nnrpd[8991]: SERVER perl filtering enabled
I just added in postfilter.pl:
use lib '/home/news/lib/perl'; use INN::Config;
and removed:
use INN::syslog;
in postfilter.pl and *.pm using it.
Does it work for you?
--
Julien ᅵLIE
ᅵ Le sel de l'existence est essentiellement dans le poivre qu'on y met. ᅵ
FYI, I also removed the shebang "#!/usr/bin/perl" when I tested
it yesterday. I don't know if it may cause a problem. (I did
not test with the line.)
The strange thing is that "perl -wc" complained about INN::syslog
whereas yours did not. That's why I removed the corresponding
line. Maybe it is enough to remove that line (not adding INN::Config,
which is the new innshellvars).
--
Julien ᅵLIE
ᅵ Cogitationis poenam nemo patitur. ᅵ
BTW, I experienced the same problem with postfilter and INN 2.4.6.
Do you remember? ;)
--
Oleksandr Samoylyk
OVS-RIPE
> I just added in postfilter.pl:
>
> use lib '/home/news/lib/perl'; use INN::Config;
>
> and removed:
>
> use INN::syslog;
>
> in postfilter.pl and *.pm using it.
>
> Does it work for you?
yes
... but i don't understand the reason
why 'use INN::syslog' is now a problem? even if it's a built in module, it
should be explicitly invoked. Are this wrong?
> The strange thing is that "perl -wc" complained about INN::syslog
> whereas yours did not.
# cat /home/news/perl/INN/syslog.pm
1;
btw thank you :-)
>> postfilter doesn't work with inn 2.5 but it fully works with 2.4. Same
>> version, same librariesm same files: with INN 2.4 it works, with inn 2.5 i
>> find in my logs entries like these:
>>
>> Nov 29 16:17:25 aioe-casa nnrpd[5386]: SERVER perl filter not defined
>
> BTW, I experienced the same problem with postfilter and INN 2.4.6.
And not with INN 2.4.4 or INN 2.4.5?
--
Julien �LIE
� Cogitationis poenam nemo patitur. �
>> and removed:
>>
>> use INN::syslog;
>>
>> in postfilter.pl and *.pm using it.
>>
>> Does it work for you?
>
> yes
> why 'use INN::syslog' is now a problem? even if it's a built in module, it
> should be explicitly invoked. Are this wrong?
INN::syslog is not shipped with INN.
http://www.eyrie.org/~eagle/software/inn/docs/hook-perl.html#S5
The following additional function is available from inside filters
embedded in innd, and is also available from filters embedded in nnrpd
(see below):
INN::syslog(level, message)
No need to explicitly "use" it. It is already embedded when the Perl
filter is used by the C code.
> # cat /home/news/perl/INN/syslog.pm
> 1;
Does it mean that you have that file in your 2.4 configuration and not
in your 2.5 configuration?
Why did you create it for INN 2.4?
--
Julien ᅵLIE
ᅵ Cogitationis poenam nemo patitur. ᅵ
I used previous versions of postfilter (0.6, 0.7) which use Sys::Syslog
instead of new INN::syslog.
However, I got it working thanks to your hints:
- created INN/syslog.pm in @INC returning just a true value from the file;
- deleted shebang line from postfilter.pl (not sure if it's actually a
cause)
--
Oleksandr Samoylyk
OVS-RIPE
I can confirm it with 2.4.6. It works well without importing INN::syslog
by "use" function. Moreover, the presence of shebang line actually
affects nothing in this case.
So, as I understand, Paolo don't need to have "use INN::syslog;" at all
in future releases of postfilter. :)
--
Oleksandr Samoylyk
OVS-RIPE