Thread View: news.software.nntp
13 messages
13 total messages
Started by Terminator
Fri, 21 Mar 2003 12:49
INN filter help ~
Author: Terminator
Date: Fri, 21 Mar 2003 12:49
Date: Fri, 21 Mar 2003 12:49
23 lines
2261 bytes
2261 bytes
Hi Guys,
I try to set the filter of my INN server and with
# vi /usr/bin/filter/filter_nnrpd.pl
if ($hdr{"Subject"} =~ /notallowedwords/i) {
$rval = "Spam is not acceptable here...";
}
I can reject the message with some bad words in the Subject,
but does someone know how to reject bad words in the body of the message ?
If you don't understand my question, you don't need to answer me.
Thanks in advance !
�C�C* Terminator * �C�C~~~ Fight for the Justice ~~~
* ~ let us linux ~ *
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Re: INN filter help ~
Author: Russ Allbery
Date: Fri, 21 Mar 2003 16:28
Date: Fri, 21 Mar 2003 16:28
21 lines
1705 bytes
1705 bytes
Terminator <terminator@terminator.com> writes:
> I try to set the filter of my INN server and with
> # vi /usr/bin/filter/filter_nnrpd.pl
> if ($hdr{"Subject"} =~ /notallowedwords/i) {
> $rval = "Spam is not acceptable here...";
> }
> I can reject the message with some bad words in the Subject, but does
> someone know how to reject bad words in the body of the message ? If
> you don't understand my question, you don't need to answer me.
nnrpd will put the body of the message in $body.
--
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: INN filter help ~
Author: Terminator
Date: Sat, 22 Mar 2003 02:33
Date: Sat, 22 Mar 2003 02:33
36 lines
2820 bytes
2820 bytes
Thanks for your kindly reply,
I will try it ~
Thanks ~
�C�C* Terminator * �C�C~~~ Fight for the Justice ~~~
"Russ Allbery" <rra@stanford.edu> wrote in message news:yl1y107kfo.fsf@windlord.stanford.edu...
Terminator <terminator@terminator.com> writes:
> I try to set the filter of my INN server and with
> # vi /usr/bin/filter/filter_nnrpd.pl
> if ($hdr{"Subject"} =~ /notallowedwords/i) {
> $rval = "Spam is not acceptable here...";
> }
> I can reject the message with some bad words in the Subject, but does
> someone know how to reject bad words in the body of the message ? If
> you don't understand my question, you don't need to answer me.
nnrpd will put the body of the message in $body.
--
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.
* ~ let us linux ~ *
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Re: INN filter help ~
Author: Arthur
Date: Wed, 26 Mar 2003 14:27
Date: Wed, 26 Mar 2003 14:27
36 lines
2741 bytes
2741 bytes
Sorry for my stupid question,
where can i put this $BODY???
--
Arthur
"Russ Allbery" <rra@stanford.edu> wrote in message news:yl1y107kfo.fsf@windlord.stanford.edu...
> Terminator <terminator@terminator.com> writes:
>
> > I try to set the filter of my INN server and with
>
> > # vi /usr/bin/filter/filter_nnrpd.pl
> > if ($hdr{"Subject"} =~ /notallowedwords/i) {
> > $rval = "Spam is not acceptable here...";
> > }
>
> > I can reject the message with some bad words in the Subject, but does
> > someone know how to reject bad words in the body of the message ? If
> > you don't understand my question, you don't need to answer me.
>
> nnrpd will put the body of the message in $body.
>
> --
> 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.
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Re: INN filter help ~
Author: Russ Allbery
Date: Wed, 26 Mar 2003 19:18
Date: Wed, 26 Mar 2003 19:18
14 lines
1449 bytes
1449 bytes
Arthur <arthur76@sinaman.com> writes:
> Sorry for my stupid question,
> where can i put this $BODY???
$body; it's case-sensitive. Use it the same way that you were using
$hdr{"Subject"}.
--
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: INN filter help ~
Author: Arthur
Date: Thu, 27 Mar 2003 07:58
Date: Thu, 27 Mar 2003 07:58
47 lines
2995 bytes
2995 bytes
Just like this;
if ($hdr{"$body"} =~ /notallowedwords/i) {
$rval = "Spam is not acceptable here...";
}
It will be work??
Also i have one more qustion, if i already has one perl
script(for not allow user kill post),can i set 2 script like
this?
sub filter_post {
my $rval = "" ; # assume we'll accept.
if ($hdr{"Control"}){
$rval = "Authorization needed to delete messages";
}
if ($hdr{"$body"} =~ /sex/i){
$rval = "NO SEX";
}
Sorry for my stupid qustion!!
--
Arthur
"Russ Allbery" <rra@stanford.edu> wrote in message news:yl7kamc4xg.fsf@windlord.stanford.edu...
Arthur <arthur76@sinaman.com> writes:
> Sorry for my stupid question,
> where can i put this $BODY???
$body; it's case-sensitive. Use it the same way that you were using
$hdr{"Subject"}.
--
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.
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Re: INN filter help ~
Author: Jeffrey M. Vinocur
Date: Thu, 27 Mar 2003 11:41
Date: Thu, 27 Mar 2003 11:41
27 lines
1714 bytes
1714 bytes
In article <3e839011$1@lungfunggdn.org>,
Arthur <arthur@arthurstudio.com> wrote:
>Just like this;
>if ($hdr{"$body"} =~ /notallowedwords/i) {
> $rval = "Spam is not acceptable here...";
> }
>
>It will be work??
No, get rid of the $hdr{""} part -- that is, it needs to be
if ($body =~ ...
>Also i have one more qustion, if i already has one perl
>script(for not allow user kill post),can i set 2 script like
>this?
Yes, more or less. The question is what error do you want if the
post is a cancel message and additionally has a disallowed word
in it (the order you put the different tests in matters).
--
Jeffrey M. Vinocur
jeff@litech.org
Re: INN filter help ~
Author: Arthur
Date: Fri, 28 Mar 2003 07:30
Date: Fri, 28 Mar 2003 07:30
43 lines
2768 bytes
2768 bytes
THANK YOU SO MUCH ALL,
I WILL TRY IT !!
THANKS~~^_^
--
Arthur
"Jeffrey M. Vinocur" <jeff@litech.org> wrote in message news:b5uo0g$2pp$1@puck.litech.org...
In article <3e839011$1@lungfunggdn.org>,
Arthur <arthur@arthurstudio.com> wrote:
>Just like this;
>if ($hdr{"$body"} =~ /notallowedwords/i) {
> $rval = "Spam is not acceptable here...";
> }
>
>It will be work??
No, get rid of the $hdr{""} part -- that is, it needs to be
if ($body =~ ...
>Also i have one more qustion, if i already has one perl
>script(for not allow user kill post),can i set 2 script like
>this?
Yes, more or less. The question is what error do you want if the
post is a cancel message and additionally has a disallowed word
in it (the order you put the different tests in matters).
--
Jeffrey M. Vinocur
jeff@litech.org
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Re: INN filter help ~
Author: Arthur
Date: Fri, 28 Mar 2003 07:49
Date: Fri, 28 Mar 2003 07:49
65 lines
3407 bytes
3407 bytes
Dear All,
I can reject bad word now, but if i want to reject two or three
bad word, how can i do this?? Now, my script is like this~
sub filter_post {
my $rval = "" ; # assume we'll accept.
if ($hdr{"Control"}){
$rval = "Authorization needed to delete messages";
}
if ($body =~ /www.sex.com/i){
$rval = "Please don't post this adv post";
}
Thank you for your help!!
^_^!
--
Arthur
"Arthur" <arthur@arthurstudio.com> wrote in message news:3e84db1b$1@lungfunggdn.org...
THANK YOU SO MUCH ALL,
I WILL TRY IT !!
THANKS~~^_^
--
Arthur
"Jeffrey M. Vinocur" <jeff@litech.org> wrote in message news:b5uo0g$2pp$1@puck.litech.org...
In article <3e839011$1@lungfunggdn.org>,
Arthur <arthur@arthurstudio.com> wrote:
>Just like this;
>if ($hdr{"$body"} =~ /notallowedwords/i) {
> $rval = "Spam is not acceptable here...";
> }
>
>It will be work??
No, get rid of the $hdr{""} part -- that is, it needs to be
if ($body =~ ...
>Also i have one more qustion, if i already has one perl
>script(for not allow user kill post),can i set 2 script like
>this?
Yes, more or less. The question is what error do you want if the
post is a cancel message and additionally has a disallowed word
in it (the order you put the different tests in matters).
--
Jeffrey M. Vinocur
jeff@litech.org
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Re: INN filter help ~
Author: Jeffrey M. Vinocur
Date: Fri, 28 Mar 2003 11:40
Date: Fri, 28 Mar 2003 11:40
18 lines
1425 bytes
1425 bytes
In article <3e84df80$1@lungfunggdn.org>,
Arthur <arthur@arthurstudio.com> wrote:
>
>I can reject bad word now, but if i want to reject two or three
>bad word, how can i do this??
I think it's probably time for you to locate a Perl tutorial or
textbook.
> if ($body =~ /www.sex.com/i){
if ($body =~ /www\.sex\.com|www\.xxx\.com/i) {
--
Jeffrey M. Vinocur
jeff@litech.org
Re: INN filter help ~
Author: Terminator
Date: Fri, 28 Mar 2003 11:52
Date: Fri, 28 Mar 2003 11:52
34 lines
2609 bytes
2609 bytes
You are great Jeffrey,
thanks for you kindly reply ~~
Arthur,
we have learnt a lot now,
the next step is to write a webpage to let users kill unwanted posts ~
�C�C* Terminator * �C�C~~~ Fight for the Justice ~~~
"Jeffrey M. Vinocur" <jeff@litech.org> wrote in message news:b61cb9$i5q$1@puck.litech.org...
In article <3e84df80$1@lungfunggdn.org>,
Arthur <arthur@arthurstudio.com> wrote:
>
>I can reject bad word now, but if i want to reject two or three
>bad word, how can i do this??
I think it's probably time for you to locate a Perl tutorial or
textbook.
> if ($body =~ /www.sex.com/i){
if ($body =~ /www\.sex\.com|www\.xxx\.com/i) {
--
Jeffrey M. Vinocur
jeff@litech.org
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Re: INN filter help ~
Author: Jeffrey M. Vinocur
Date: Fri, 28 Mar 2003 20:08
Date: Fri, 28 Mar 2003 20:08
18 lines
1404 bytes
1404 bytes
In article <3e851899$1@lungfunggdn.org>, Terminator <terminator@terminator.com> wrote: >You are great Jeffrey, >thanks for you kindly reply ~~ Sure. >the next step is to write a webpage to let users kill unwanted posts ~ Why not just permit cancel messages? Most newsreaders have a feature to send cancel messages... -- Jeffrey M. Vinocur jeff@litech.org
Re: INN filter help ~
Author: Arthur
Date: Sat, 29 Mar 2003 10:07
Date: Sat, 29 Mar 2003 10:07
44 lines
2861 bytes
2861 bytes
thanks for all your kindly reply ~
I will try my best to learn more!!^_^
--
Arthur
"Terminator" <terminator@terminator.com> wrote in message news:3e851899$1@lungfunggdn.org...
> You are great Jeffrey,
> thanks for you kindly reply ~~
> Arthur,
> we have learnt a lot now,
> the next step is to write a webpage to let users kill unwanted posts ~
>
> �C�C* Terminator * �C�C~~~ Fight for the Justice ~~~
>
> "Jeffrey M. Vinocur" <jeff@litech.org> wrote in message news:b61cb9$i5q$1@puck.litech.org...
> In article <3e84df80$1@lungfunggdn.org>,
> Arthur <arthur@arthurstudio.com> wrote:
> >
> >I can reject bad word now, but if i want to reject two or three
> >bad word, how can i do this??
>
> I think it's probably time for you to locate a Perl tutorial or
> textbook.
>
>
> > if ($body =~ /www.sex.com/i){
>
> if ($body =~ /www\.sex\.com|www\.xxx\.com/i) {
>
> --
> Jeffrey M. Vinocur
> jeff@litech.org
>
>
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
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