Thread View: news.software.nntp
8 messages
8 total messages
Started by Christian Stöger
Tue, 19 Jun 2001 12:19
problem filtering (filter_ind.pl)
Author: Christian Stöger
Date: Tue, 19 Jun 2001 12:19
Date: Tue, 19 Jun 2001 12:19
18 lines
1455 bytes
1455 bytes
Hi, I've got a problem with the file filter_innd.pl. If a posting is rejected by filter_innd.pl, the user gets an error message. But I don't want the server to send any error messages to the user. How do I have to setup inn to solve my problem? I use inn 2.3.2 on RedHat 7.0 Thanks for your help!! -- ________________________________________________________________ Christian St�ger christian.stoeger@gmx.de ________________________________________________________________
Re: problem filtering (filter_ind.pl)
Author: Terrance Richard Boyes
Date: Tue, 19 Jun 2001 19:15
Date: Tue, 19 Jun 2001 19:15
28 lines
2105 bytes
2105 bytes
Christian St�ger <christian.stoeger@einsteinet.de> wrote:
> I've got a problem with the file filter_innd.pl.
> If a posting is rejected by filter_innd.pl, the user gets an error message.
> But I don't want the server to send any error messages to the user.
> How do I have to setup inn to solve my problem?
AFAIK you can't, without hacking.
Have a look in src/nnrpd/commands.c, line ~882
Reply("%d %s\r\n", NNTP_POSTFAIL_VAL, response);
You could hardcode the response to be some generic message.
I wouldn't recommend not sending anything at all though as
some client software /may/ barf.
NB this would affect all error returns, not just those
from the filter. You could maybe just set the generic
message on 437, which covers all the filters plus bad
headers and so on, but would still let other errors
be returned normally.
--
<URL:http://www.pierrot.co.uk/> Team AMIGA
Big book, big bore.
Re: problem filtering (filter_ind.pl)
Author: Terrance Richard Boyes
Date: Tue, 19 Jun 2001 19:52
Date: Tue, 19 Jun 2001 19:52
26 lines
2094 bytes
2094 bytes
Terrance Richard Boyes <tez@pierrot.co.uk> wrote:
> NB this would affect all error returns, not just those
> from the filter. You could maybe just set the generic
> message on 437, which covers all the filters plus bad
> headers and so on, but would still let other errors
> be returned normally.
Even better, look at innd/art.c, in the ARTpost function,
line ~2072
sprintf(buff, "%d %.200s", NNTP_REJECTIT_VAL, filterrc);
syslog(L_NOTICE, "rejecting[perl] %s %s", Data.MessageID, buff);
Change the sprintf to make it like the syslog...
sprintf(buff, "%d [perl] %.200s", NNTP_REJECTIT_VAL, filterrc);
Then in commands.c you can check that the error was returned
specifically by [perl].
--
<URL:http://www.pierrot.co.uk/> Team AMIGA
He that would govern others, first should be the master of himself.
Re: problem filtering (filter_ind.pl)
Author: Russ Allbery
Date: Tue, 19 Jun 2001 21:14
Date: Tue, 19 Jun 2001 21:14
19 lines
1769 bytes
1769 bytes
Christian St�ger <christian.stoeger@einsteinet.de> writes:
> I've got a problem with the file filter_innd.pl. If a posting is
> rejected by filter_innd.pl, the user gets an error message. But I don't
> want the server to send any error messages to the user.
> How do I have to setup inn to solve my problem?
If you can do the rejecting from filter_nnrpd.pl, you have more
flexibility at present about what to do with the message, including making
it look like the post was successful. That flexibility isn't in
filter_innd.pl yet, though.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: problem filtering (filter_ind.pl)
Author: Christian Stöger
Date: Wed, 20 Jun 2001 06:36
Date: Wed, 20 Jun 2001 06:36
27 lines
2033 bytes
2033 bytes
Russ Allbery wrote: > Christian St�ger <christian.stoeger@einsteinet.de> writes: > > > I've got a problem with the file filter_innd.pl. If a posting is > > rejected by filter_innd.pl, the user gets an error message. But I don't > > want the server to send any error messages to the user. > > > How do I have to setup inn to solve my problem? > > If you can do the rejecting from filter_nnrpd.pl, you have more > flexibility at present about what to do with the message, including making > it look like the post was successful. That flexibility isn't in > filter_innd.pl yet, though. > Rejecting from filter_nnrpd.pl is possible, but I don't know how to throw the message away (or mailing it to the admins) without sending an error message to the user (spammer). -- ________________________________________________________________ Christian St�ger christian.stoeger@gmx.de ________________________________________________________________
Re: problem filtering (filter_ind.pl)
Author: Russ Allbery
Date: Wed, 20 Jun 2001 06:43
Date: Wed, 20 Jun 2001 06:43
27 lines
2424 bytes
2424 bytes
Christian St�ger <christian.stoeger@einsteinet.de> writes:
> Rejecting from filter_nnrpd.pl is possible, but I don't know how to
> throw the message away (or mailing it to the admins) without sending an
> error message to the user (spammer).
See README.perl_hook:
If filter_post() returns something other than the empty string, this
message is normally returned to the client as an error. There are two
exceptions: If the string returned begins with "DROP", the post will be
silently discarded and success returned to the client. If the string
begins with "SPOOL", success is returned to the client, but the post is
saved in a directory named "spam" under the directory specified by
pathincoming in inn.conf (in a directory named "spam/mod" if the post is
to a moderated group). This is intended to allow manual inspection of
the suspect messages; if they should be posted, they can be manually
moved out of the subdirectory to the directory specified by pathincoming
in inn.conf, where they can be posted by running `rnews -U'. If you use
this functionality, make sure those directories exist.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: problem filtering (filter_ind.pl)
Author: Andrew Gierth
Date: Wed, 20 Jun 2001 06:52
Date: Wed, 20 Jun 2001 06:52
16 lines
1793 bytes
1793 bytes
>>>>> "Christian" == Christian St�ger <christian.stoeger@einsteinet.de> writes: Christian> Rejecting from filter_nnrpd.pl is possible, but I don't Christian> know how to throw the message away (or mailing it to the Christian> admins) without sending an error message to the user Christian> (spammer). If the rejection message from filter_nnrpd.pl begins with "DROP", then a successful return is made to the user and the post is discarded. If the message begins with "SPOOL" then the message is dumped in the incoming/spam directory (which you should create) and a successful return made to the user. -- Andrew.
Re: problem filtering (filter_ind.pl)
Author: Christian Stöger
Date: Wed, 20 Jun 2001 07:02
Date: Wed, 20 Jun 2001 07:02
38 lines
2718 bytes
2718 bytes
Russ Allbery wrote: > Christian St�ger <christian.stoeger@einsteinet.de> writes: > > > Rejecting from filter_nnrpd.pl is possible, but I don't know how to > > throw the message away (or mailing it to the admins) without sending an > > error message to the user (spammer). > > See README.perl_hook: > > If filter_post() returns something other than the empty string, this > message is normally returned to the client as an error. There are two > exceptions: If the string returned begins with "DROP", the post will > be > silently discarded and success returned to the client. If the string > begins with "SPOOL", success is returned to the client, but the post > is saved in a directory named "spam" under the directory specified by > pathincoming in inn.conf (in a directory named "spam/mod" if the post > is > to a moderated group). This is intended to allow manual inspection of > the suspect messages; if they should be posted, they can be manually > moved out of the subdirectory to the directory specified by > pathincoming > in inn.conf, where they can be posted by running `rnews -U'. If you > use this functionality, make sure those directories exist. > That's all I wanted to know ! Thanks -- ________________________________________________________________ Christian St�ger christian.stoeger@gmx.de ________________________________________________________________
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads