Thread View: news.software.nntp
19 messages
19 total messages
Started by John F. Morse
Sun, 01 Oct 2006 17:35
Cleanfeed config to allow HTML and binary attachments
Author: John F. Morse
Date: Sun, 01 Oct 2006 17:35
Date: Sun, 01 Oct 2006 17:35
46 lines
2643 bytes
2643 bytes
I can post an image inserted inline to my "local" groups, but if I
attach it, the server refuses to accept it. They are small .jpg files.
I usually insert, so I was unaware of the problem until a user pointed
it out today when trying to post a screen capture of his ISP's mail
server page.
I had forgotten to change this file after renaming the local groups by
adding "xanadu." to their names.
This is Cleanfeed 20020501.
I don't use the cleanfeed.local file ($config_dir => 'undef'), but
instead use just the filter_innd.pl (which is the cleanfeed.pl version).
# Copyright 1999 Jeremy Nixon <jeremy@exit109.com>
# Copyright 2001 Marco d'Itri <md@linux.it>)
Here are the parts I modified, with the added groups (xanadu.*) added as
"^xanadu\." on the ends:
### binaries allowed if groups match
bin_allowed => '^\w+\.binae?r|^alt\.sex\.pictures|^fur\.artwork'.
'|^alt\.anonymous\.messages$|^de\.alt\.dateien|^rec\.games\.bolo$'.
'|^comp\.security\.pgp\.test$|^sfnet\.tiedostot'.
'|^fido\.|^linux\.|^unidata|^xanadu\.',
<snip>
### HTML allowed here (if block_html or block_multi_alt is
turned on)
html_allowed => '^microsoft\.|^xanadu\.',
What am I missing, where did I goof, or is there another place that is
rejecting attachments?
What does the "^" represent?
Could this file simply use "xanadu.*" instead of "xanadu\." for a wildcard?
TIA,
--
John
Re: Cleanfeed config to allow HTML and binary attachments
Author: Jeffrey M. Vinocur
Date: Mon, 02 Oct 2006 13:34
Date: Mon, 02 Oct 2006 13:34
50 lines
2728 bytes
2728 bytes
In article <O%STg.165050$QM6.101199@bgtnsc05-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>
> I don't use the cleanfeed.local file ($config_dir => 'undef'), but
>instead use just the filter_innd.pl (which is the cleanfeed.pl version).
You did see this comment, right:
##############################################################################
# WARNING: NO USER SERVICEABLE PARTS BELOW THIS LINE
# IF YOU WANT TO CHANGE SOMETHING, PLEASE USE cleanfeed.local
##############################################################################
(You don't have to use the whole big cleanfeed.local that comes
as an example; you can make your own simple one.)
>What am I missing, where did I goof, or is there another place that is
>rejecting attachments?
I would find the corresponding error message (either from the
newsreader if it will show it to you) or from the logs and then
look through cleanfeed to see where it's generated.
>What does the "^" represent?
The beginning. If you didn't have that, your pattern would match
something like rec.arts.xanadu, which isn't what you intended.
>Could this file simply use "xanadu.*" instead of "xanadu\." for a wildcard?
If you don't escape the period, it will match any character, so
your pattern would match groups like xanadufoo.misc, which isn't
what you intended. If you really wanted you could write
^xanadu\..*$
to be really explicit about what you're trying to match, but that
wouldn't change the semantics at all.
The perlre manpage is the place to learn all of this, btw.
--
Jeffrey M. Vinocur
jeff@litech.org
Re: Cleanfeed config to allow HTML and binary attachments
Author: John F. Morse
Date: Wed, 04 Oct 2006 01:45
Date: Wed, 04 Oct 2006 01:45
141 lines
6076 bytes
6076 bytes
Jeffrey M. Vinocur wrote:
>In article <O%STg.165050$QM6.101199@bgtnsc05-news.ops.worldnet.att.net>,
>John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>
>>I don't use the cleanfeed.local file ($config_dir => 'undef'), but
>>instead use just the filter_innd.pl (which is the cleanfeed.pl version).
>>
>>
>
>You did see this comment, right:
>
>##############################################################################
># WARNING: NO USER SERVICEABLE PARTS BELOW THIS LINE
># IF YOU WANT TO CHANGE SOMETHING, PLEASE USE cleanfeed.local
>##############################################################################
>
>
>(You don't have to use the whole big cleanfeed.local that comes
>as an example; you can make your own simple one.)
>
>
Yes, Jeff, I sure did, several times. I tested it and it works
regardless of this warning. The cleanfeed.local file was more of a demo,
and written for mostly an Italian site.
I modified the configuration file instead of using or creating the
cleanfeed.local approach. All I needed was to add six of the local
groups at the time (brisbee, computers, ..., local.test). It had these
areas very well documented, allowing me to simply add my groups to those
already in the file, as "...brisbee|computers|petchat|... etc.
It worked fine for me then, and included all kinds of other great
filtering"words" to reject unwanted messages.
When I renamed the groups to add the "xanadu." hierarchy, I had
forgotten the cleanfeed configuration I had modified earlier. A user
pointed out he couldn't post a HTML message. I checked, and sure enough,
the problem was my forgetting to change all six groups by adding the
"xanadu." to them.
Since the groups all were now within the xanadu. hierarchy, I edited the
cleanfeed configuration file to simply use "xanadu.*" or as it actually
needs to be, "^xanadu\." which should cover all of these local groups.
It did allow posting a message with an embedded (inline) image, which is
the preferred method I use, but it still failed for the user. I then
found out from him that his failure is when attaching an image, and this
was verified as failing for me.
So, it's an issue with attaching and not embedding HTML and/or an image.
>>What am I missing, where did I goof, or is there another place that is
>>rejecting attachments?
>>
>>
>
>I would find the corresponding error message (either from the
>newsreader if it will show it to you) or from the logs and then
>look through cleanfeed to see where it's generated.
>
>
The logs do not go into enough detail. Then there are at least two areas
in the "filter_innd.pl" which have something to do with binaries or
HTML. I posted these earlier. Neither give me a clue.
Here they are again:
Here are the parts I modified, with the added groups (xanadu.*) added as
"^xanadu\." on the ends:
### binaries allowed if groups match
bin_allowed => '^\w+\.binae?r|^alt\.sex\.pictures|^fur\.artwork'.
'|^alt\.anonymous\.messages$|^de\.alt\.dateien|^rec\.games\.bolo$'.
'|^comp\.security\.pgp\.test$|^sfnet\.tiedostot'.
'|^fido\.|^linux\.|^unidata|^xanadu\.',
<snip>
### HTML allowed here (if block_html or block_multi_alt is turned
on)
html_allowed => '^microsoft\.|^xanadu\.',
>>What does the "^" represent?
>>
>>
>
>The beginning. If you didn't have that, your pattern would match
>something like rec.arts.xanadu, which isn't what you intended.
>
>
OK. Thanks for this info.
>>Could this file simply use "xanadu.*" instead of "xanadu\." for a wildcard?
>>
>>
>
>If you don't escape the period, it will match any character, so
>your pattern would match groups like xanadufoo.misc, which isn't
>what you intended. If you really wanted you could write
>
> ^xanadu\..*$
>
>to be really explicit about what you're trying to match, but that
>wouldn't change the semantics at all.
>
>
OK, again, and thanks, again.
>The perlre manpage is the place to learn all of this, btw.
>
I did try to find this, but evidentially this Linux box does not have
the Perl man package. This is an old Lindows distro, and has little for
anything serious, and the CNR download and install is nowhere as good as
apt-get, plus Linspire likes to rename files to look more familiar with
previous Windows users.
I do have it on the Debian Linux box in the basement, where I downloaded
and installed it previously using apt-get. I will go down there tonight
and have a session with perlre and see what I can reap.
Thanks for this reminder -- I need to see what the $ is representing. ;-)
--
John
Re: Cleanfeed config to allow HTML and binary attachments
Author: Alan Connor
Date: Wed, 04 Oct 2006 02:46
Date: Wed, 04 Oct 2006 02:46
34 lines
2319 bytes
2319 bytes
On news.software.nntp, in <O%STg.165050$QM6.101199@bgtnsc05-news.ops.worldnet.att.net>, "John F. Morse" wrote: > I can post an image inserted inline to my "local" groups, but > if I attach it, the server refuses to accept it. They are small > .jpg files. On every text group I'm subscribed to, html or multipart headers would result in your post (or the article) being left on the server. Or the displayed article would get you killfiled by the less sophisticated. Most of the people I know don't even have their newsreaders configured to display HTML or images. HTML and images belong on web/ftp sites. We have web browsers for that that can be called in a blink by a keystroke. That's how _we_ display images for people on the Usenet. We put URLs to webpages in our signatures, or the body if topical. It's much more satisfactory than what one can do with a Usenet post in that regard. And it keeps people from offering eye-candy in lieu of content. <snip> Alan -- http://home.earthlink.net/~alanconnor/contact.html http://home.earthlink.net/~alanconnor/cr.html http://home.earthlink.net/~alanconnor/publickey.html
Re: Cleanfeed config to allow HTML and binary attachments
Author: John F. Morse
Date: Wed, 04 Oct 2006 05:19
Date: Wed, 04 Oct 2006 05:19
57 lines
3208 bytes
3208 bytes
Alan Connor wrote: >On news.software.nntp, in ><O%STg.165050$QM6.101199@bgtnsc05-news.ops.worldnet.att.net>, >"John F. Morse" wrote: > > > >> I can post an image inserted inline to my "local" groups, but >>if I attach it, the server refuses to accept it. They are small >>.jpg files. >> >> > >On every text group I'm subscribed to, html or multipart headers >would result in your post (or the article) being left on the >server. Or the displayed article would get you killfiled >by the less sophisticated. > >Most of the people I know don't even have their newsreaders >configured to display HTML or images. > >HTML and images belong on web/ftp sites. We have web browsers >for that that can be called in a blink by a keystroke. > >That's how _we_ display images for people on the Usenet. We put >URLs to webpages in our signatures, or the body if topical. It's >much more satisfactory than what one can do with a Usenet post in >that regard. > >And it keeps people from offering eye-candy in lieu of content. > ><snip> > >Alan > Alan, that's fine and dandy for you and your friends. Plus text groups should be just that -- text only. However, my server has always allowed HTML, MIDI, JPEG, whatever, in the groups we host. They are local, and require authentication. There is no restriction except for size. Rarely is a multipart posted. It is not like the alt hierarchy at all. People use my server because they despise "Webnews" and "Webmail." They post drawings they create, and pictures of their environment and hobbies. A picture is often worth a thousand words. They do not have Web servers available, and most don't have a clue about how to FTP or even create a Website. Your suggestions and observations are fine for Usenet, but do not apply to a private server -- unless it is yours, of course. ;-) -- John
Re: Cleanfeed config to allow HTML and binary attachments
Author: Alan Connor
Date: Wed, 04 Oct 2006 08:12
Date: Wed, 04 Oct 2006 08:12
103 lines
4922 bytes
4922 bytes
On news.software.nntp, in <AvHUg.186406$QM6.173497@bgtnsc05-news.ops.worldnet.att.net>, "John F. Morse" wrote: > Alan Connor wrote: > >>On news.software.nntp, in >><O%STg.165050$QM6.101199@bgtnsc05-news.ops.worldnet.att.net>, >>"John F. Morse" wrote: >> >>> I can post an image inserted inline to my "local" groups, >>>but if I attach it, the server refuses to accept it. They are >>>small .jpg files. >> >>On every text group I'm subscribed to, html or multipart >>headers would result in your post (or the article) being left >>on the server. Or the displayed article would get you killfiled >>by the less sophisticated. >> >>Most of the people I know don't even have their newsreaders >>configured to display HTML or images. >> >>HTML and images belong on web/ftp sites. We have web browsers >>for that that can be called in a blink by a keystroke. >> >>That's how _we_ display images for people on the Usenet. We >>put URLs to webpages in our signatures, or the body if >>topical. It's much more satisfactory than what one can do with >>a Usenet post in that regard. >> >>And it keeps people from offering eye-candy in lieu of content. >> >><snip> >> >>Alan > > Alan, that's fine and dandy for you and your friends. Plus text > groups should be just that -- text only. > > However, my server has always allowed HTML, MIDI, JPEG, > whatever, in the groups we host. They are local, and require > authentication. There is no restriction except for size. An incredible restriction for images and audio files! > Rarely is a multipart posted. It is not like the alt hierarchy > at all. > > People use my server because they despise "Webnews" and > "Webmail." They post drawings they create, and pictures of > their environment and hobbies. A picture is often worth a > thousand words. They do not have Web servers available, and > most don't have a clue about how to FTP or even create a > Website. > > Your suggestions and observations are fine for Usenet, but do > not apply to a private server -- unless it is yours, of course. > ;-) Point taken. I certainly agree about the travesties that have resulted from trying to turn web servers into, for example, newsservers (web forums). But what you are doing is trying to turn a newsserver into a webserver, the very same mistake. You end up with the worst of both worlds. And have to deal with administrative hassles like yours here. Forever. Basic HTML is very simple. A one page tutorial and you can have people creating very pleasing web pages with infinitely more creative freedom than a newsserver could ever allow. You know this. Don't need a webserver, just an FTP server, which is childsplay to install, configure, administrate and use. Very low bandwidth. for the numbers you are dealing with. You could run it on a dialup. Click a link in a post to bring down an HTML document from the FTP server and display it in another window in a browser. Have a script that will post whatever file you want to the FTP server. Kindergarden stuff. Personally, I hate what the merchants have done to the Web. I like the Magazine Standard for web pages: What you see in any page can be printed in its entirety. (You can easily check and see if your web page meets this standard by running it through a utility like htmldoc. If you get two pages of PDF, it's too long. And then you can see what it would look like printed in a PDF previewer.) Cheers, Alan -- http://home.earthlink.net/~alanconnor/contact.html http://home.earthlink.net/~alanconnor/cr.html http://home.earthlink.net/~alanconnor/publickey.html
Re: Cleanfeed config to allow HTML and binary attachments
Author: Jeffrey M. Vinocur
Date: Wed, 11 Oct 2006 02:07
Date: Wed, 11 Oct 2006 02:07
28 lines
2179 bytes
2179 bytes
In article <_mEUg.185118$QM6.167675@bgtnsc05-news.ops.worldnet.att.net>, John F. Morse <xanadu.bbs@invalid.net> wrote: > >Yes, Jeff, I sure did, several times. I tested it and it works >regardless of this warning. The cleanfeed.local file was more of a demo, >and written for mostly an Italian site. I still think what you're doing is a mistake, but okay. >So, it's an issue with attaching and not embedding HTML and/or an image. > > [...] > >The logs do not go into enough detail. Then there are at least two areas >in the "filter_innd.pl" which have something to do with binaries or >HTML. I posted these earlier. Neither give me a clue. Right, I know which parts you modified, but clearly those didn't fix your problem. I'm pretty sure Cleanfeed will return a specific error message that will guide you (me) to the right part of the code, if you can just figure out how to get it (either from your newsreader or from the $pathlog/news file). -- Jeffrey M. Vinocur jeff@litech.org
Re: Cleanfeed config to allow HTML and binary attachments
Author: John F. Morse
Date: Wed, 11 Oct 2006 02:42
Date: Wed, 11 Oct 2006 02:42
77 lines
4147 bytes
4147 bytes
Jeffrey M. Vinocur wrote: >In article <_mEUg.185118$QM6.167675@bgtnsc05-news.ops.worldnet.att.net>, >John F. Morse <xanadu.bbs@invalid.net> wrote: > > >>Yes, Jeff, I sure did, several times. I tested it and it works >>regardless of this warning. The cleanfeed.local file was more of a demo, >>and written for mostly an Italian site. >> >> > >I still think what you're doing is a mistake, but okay. > > Hmmmm.... It's okay with you if I do it to my news server, or, it is okay to do it because it will run okay? ;-) I could use the cleanfeed.local file, and may do so once I understand Cleanfeed a little better. Right now it is working fine keeping the garbage from Usenet from polluting the server. Or, in other words, my time in the Army taught me "if it ain't broke, don't fix it." The Army way was to disassemble brand new five-ton trucks repeatedly for "maintenance" reasons (look-busy work), which caused an immense amount of lost parts and worn threads. Cleanfeed is protecting me from those who are set on destroying Usenet, even though it is maybe a little overly-protective to my users right now. They can always embed graphics inline if they need, since that Cleanfeed config option seems to be working. When I get the time, I'll dig into cleanfeed.local further. >>So, it's an issue with attaching and not embedding HTML and/or an image. >> >>[...] >> >>The logs do not go into enough detail. Then there are at least two areas >>in the "filter_innd.pl" which have something to do with binaries or >>HTML. I posted these earlier. Neither give me a clue. >> >> > >Right, I know which parts you modified, but clearly those didn't >fix your problem. I'm pretty sure Cleanfeed will return a >specific error message that will guide you (me) to the right part >of the code, if you can just figure out how to get it (either >from your newsreader or from the $pathlog/news file). > I'm sorry I haven't had time to work on this lately. I've torn apart the basement and have boxes everywhere. I'm trying to get rid of seven closets of my late mother's clothes, shoes and hats, so my wife and I can use the space for our things. The pile of clothes for a charity pick-up may approach 42 feet in height, since the closets are all about six feet wide. That exceeds my garage ceiling height about five times. ;-) I've also had a SSDI hearing and a VA hospital appointment last week, and have a real estate tax appeal hearing Monday. These all take a lot of work to get documents ready, etc. I'll try tomorrow and see if I can cause an attachment error, and then find a log entry. Stay tuned. The Fat Lady has not yet sung. ;-) -- John
Re: Cleanfeed config to allow HTML and binary attachments
Author: John F. Morse
Date: Thu, 12 Oct 2006 03:17
Date: Thu, 12 Oct 2006 03:17
41 lines
2961 bytes
2961 bytes
John F. Morse wrote: > I'm sorry I haven't had time to work on this lately. I've torn apart > the basement and have boxes everywhere. I'm trying to get rid of seven > closets of my late mother's clothes, shoes and hats, so my wife and I > can use the space for our things. The pile of clothes for a charity > pick-up may approach 42 feet in height, since the closets are all > about six feet wide. That exceeds my garage ceiling height about five > times. ;-) > > I've also had a SSDI hearing and a VA hospital appointment last week, > and have a real estate tax appeal hearing Monday. These all take a lot > of work to get documents ready, etc. > > I'll try tomorrow and see if I can cause an attachment error, and then > find a log entry. > > Stay tuned. The Fat Lady has not yet sung. ;-) Jeff, I tried both an attached gif and an inserted inline gif, and both worked tonight. I've requested the OP repost the same tests, and we'll see if his posts work or not. This may be another of those mysterious "fixes" that happen when INN crosses over midnight (or 0400 as is in the /etc/cron.d/inn2 default). I'm just not experienced with such great software that continues to fix what the unknowing operator breaks. I've learned to "sleep on it" and it usually will be fine the next day. This also includes those huge history files, which are normal now. Are you accessing my server at night and fixing stuff? ;-) -- John
Re: Cleanfeed config to allow HTML and binary attachments
Author: Jeffrey M. Vinocur
Date: Thu, 12 Oct 2006 12:38
Date: Thu, 12 Oct 2006 12:38
14 lines
1662 bytes
1662 bytes
In article <qSYWg.242888$QM6.16449@bgtnsc05-news.ops.worldnet.att.net>, John F. Morse <xanadu.bbs@invalid.net> wrote: > >It's okay with you if I do it to my news server, or, it is okay to do it >because it will run okay? ;-) Well, I think it's going to get you into trouble at some indefinite point in the future, and that I'm probably going to end up taking the time to help you fix it. -- Jeffrey M. Vinocur jeff@litech.org
Re: Cleanfeed config to allow HTML and binary attachments
Author: John F. Morse
Date: Mon, 16 Oct 2006 21:34
Date: Mon, 16 Oct 2006 21:34
192 lines
9314 bytes
9314 bytes
Jeffrey M. Vinocur wrote:
>In article <qSYWg.242888$QM6.16449@bgtnsc05-news.ops.worldnet.att.net>,
>John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>
>>It's okay with you if I do it to my news server, or, it is okay to do it
>>because it will run okay? ;-)
>>
>>
>
>Well, I think it's going to get you into trouble at some
>indefinite point in the future, and that I'm probably going to
>end up taking the time to help you fix it.
>
I'd sure like to know why you think this. I need to learn why, and I
hope you don't consider my inquiry to mean I dispute what you say. I'm
just very curious, and want to learn the nuts and bolts so I can better
help myself (and others) in the future.
I'm not trolling or looking for any argument. I'm just curious why my
testing using the final arbitrator -- the computer -- seems to run this
script OK, but you feel it cannot be trusted.
I can understand the time issue, and if you do not have the time, I will
not feel slighted. I don't have the time either, but I consider this
time spent a valuable learning experience for me. I'm borrowing time
from other things that I need to do, just so the users can have a free
news server. These users can insert images like I do, instead of
attaching them. Plus I wonder what will happen if they want to attach
some other file type, like a MIDI? After all, the error is reporting
"Attached HTML file" when it is really a jpg file.
Back to the original Cleanfeed problem....
I had time to run some tests today. My assistant sent me a message with
a small jpg graphic. He stated he attached the image. However, I don't
know for sure, but it appears as an inline insert.
The source says:
Content-Disposition: inline;
I replied to his message, quoting all of it. Then I copied and pasted
the same graphic image into the body of my reply, a couple of lines
below the graphic he supplied.
I also saved his image as a jpg file to disk, then attached it to the reply.
When I attempted to send the message, it failed.
I then deleted the attached jpg file and the message successfully posted
-- with the two inserted jpg images within the text.
I can't explain the earlier test (which I mentioned in the message of
20061012 0317Z), where the attached gif file worked. I believe I used a
Debian computer in the basement which may have had that host listed as
"special" in readers.conf at the time. It is not the INN host, but
another I use for maintenance, usually via ssh. It has Thunderbird on
it, which "should" not be different than the Mozilla on this box I used
today, nor should there be any difference between a gif and a jpg when
attached as a file. That test working was not the problem, but verifying
this jpg failing today is.
As you requested, here are all of the error dialogs and log entries that
I could find concerning this attempted post:
The actual Mozilla error message dialog pop-up states:
"A News (NNTP) error occurred: 437 Attached HTML file"
When I dismiss this dialog (clicking "OK"), I get a second dialog
pop-up, stating:
"Sending of message failed.
"The message could not be posted because connecting to the news server
failed. The server may be unavailable or is refusing connections. Please
verify that your news server setting is correct and try again, or else
contact your network administrator."
This second error dialog is probably Mozilla's generic failure message,
while the first one would be from INN.
From /var/log/news/news.notice:
Oct 16 14:44:39 localhost nnrpd[10977]: wintergreen18.my.net
(192.168.89.180) connect
Oct 16 14:44:39 localhost nnrpd[10977]: wintergreen18.my.net user john
Oct 16 14:44:40 localhost nnrpd[10977]: SERVER perl filtering enabled
Oct 16 14:44:40 localhost innd: localhost connected 17
Oct 16 14:44:40 localhost innd: rejecting[perl]
<eh0nf7$an1$1@optima7.my.net> 437 Attached HTML file
Oct 16 14:44:40 localhost innd: localhost:17 closed seconds 0 accepted 0
refused 0 rejected 1 duplicate 0 accepted size 0 duplicate size 0
Oct 16 14:44:40 localhost nnrpd[10977]: wintergreen18.my.net post failed
437 Attached HTML file
Oct 16 14:46:59 localhost innd: localhost connected 17
Oct 16 14:46:59 localhost innd: localhost:17 closed seconds 0 accepted 1
refused 0 rejected 0 duplicate 0 accepted size 19041 duplicate size 0
Oct 16 14:46:59 localhost nnrpd[10977]: wintergreen18.my.net post ok
<eh0njj$an1$2@optima7.my.net>
From /var/log/news/news:
Oct 16 14:44:40.047 - not-for-mail <eh0nf7$an1$1@optima7.my.net> 437
Attached HTML file
Oct 16 14:46:59.859 + not-for-mail <eh0njj$an1$2@optima7.my.net> 19041
As you can see, I removed the attachment than reposted the message two
minutes after the rejected posting.
The original post for this problem (20061001 1735Z) contained the
following additions to the filter_innd.pl file:
Here are the parts I modified, with the added groups (xanadu.*) added as
"^xanadu\." on the ends:
### binaries allowed if groups match
bin_allowed => '^\w+\.binae?r|^alt\.sex\.pictures|^fur\.artwork'.
'|^alt\.anonymous\.messages$|^de\.alt\.dateien|^rec\.games\.bolo$'.
'|^comp\.security\.pgp\.test$|^sfnet\.tiedostot'.
'|^fido\.|^linux\.|^unidata|^xanadu\.',
<snip>
### HTML allowed here (if block_html or block_multi_alt is turned
on)
html_allowed => '^microsoft\.|^xanadu\.',
Before the groups were renamed, I had each group listed individually,
but only in the "### binaries allowed..." stanza. Here is the old config
for that portion of filter_innd.pl:
### binaries allowed if groups match
bin_allowed => '^\w+\.binae?r|^alt\.sex\.pictures|^fur\.artwork'.
'|^alt\.anonymous\.messages$|^de\.alt\.dateien|^rec\.games\.bolo$'.
'|^comp\.security\.pgp\.test$|^sfnet\.tiedostot'.
'|^fido\.|^linux\.|^unidata|brisbee|computers|petchat|raucouscaucus|soapbox|local.test',
I did not have any trouble posting inline graphics and/or HTML with the
above, but whether posting of any attachments was attempted cannot be
verified. The above worked but is incorrect since I didn't use proper
Perl ("wildmat") syntax (the beginning "^").
Last night's INN daily report shows Cleanfeed is working, and working well:
Post expiration status:
Server status:
Server running
Allowing remote connections
Parameters c 0 i 50 (0) l 1000000 o 1011 t 300 H 2 T 60 X 0 normal specified
Not reserved
Readers follow enabled
Perl filtering enabled
Perl filter stats: Pass: 183389 Reject: 7925 Refuse: MD5: 119 PHL: 158 FSL: 59
Apparently these totals shown above do not zero out daily:
Sites sending bad articles:
Server Total Group Dist Duplic Unapp TooOld Site Line Other
news76.my.net 180 0 0 0 3 0 0 0 177
TOTAL: 1 180 0 0 0 3 0 0 0 177
Supposedly-moderated groups with unmoderated postings [Top 20]:
Groups Count
christnet.theology 1
christnet.philosophy 1
christnet.christianlife 1
TOTAL: 3 3
INND perl filter [Top 20]:
Reason Count
Binary in non-binary group 177
TOTAL: 1 177
Ideas?
--
John
Re: Cleanfeed config to allow HTML and binary attachments
Author: Jeffrey M. Vinocur
Date: Tue, 17 Oct 2006 01:28
Date: Tue, 17 Oct 2006 01:28
52 lines
3391 bytes
3391 bytes
In article <4WSYg.73790$QZ1.22699@bgtnsc04-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>I'd sure like to know why you think this. I need to learn why, and I
>hope you don't consider my inquiry to mean I dispute what you say. I'm
>just very curious, and want to learn the nuts and bolts so I can better
>help myself (and others) in the future.
>
>I'm not trolling or looking for any argument. I'm just curious why my
>testing using the final arbitrator -- the computer -- seems to run this
>script OK, but you feel it cannot be trusted.
Okay, let me tackle this first to get it out of the way, and then
I'll try to get through the rest of the post.
You're essentially saying, "Why bother having configuration files
and settable options, when I can just make changes directly to
the source code?"
This is a question that has long been settled, which is why
essentially every software package of any substance has a system
of some kind to allow the user to configure it without modifying
the source.
Here are a couple reasons off the top of my head:
(1) The software can be more robust if the developer sets out
clearly where modifications should take place, rather than
having to try to write code that will work even when
changes are made to it by someone who doesn't understand
the assumptions underlying it.
(2) When it comes time to upgrade to a new version, it's much
easier to figure out what customization you've done when
it's all set out in a separate file, rather than having to
extract it back out from the source and reapply those
changes to the new version.
(3) When talking to other people about your configuration, it's
easier to communicate clearly by describing the settings
you're using, rather than the changes you've made to the
source code.
Your testing may be enough to convince you that #1 isn't a
problem for you, and well and good. But #2 is the problem that
I'm worried about down the road. And probably we're having #3 as
we speak.
--
Jeffrey M. Vinocur
jeff@litech.org
Re: Cleanfeed config to allow HTML and binary attachments
Author: Jeffrey M. Vinocur
Date: Tue, 17 Oct 2006 02:15
Date: Tue, 17 Oct 2006 02:15
81 lines
4695 bytes
4695 bytes
In article <4WSYg.73790$QZ1.22699@bgtnsc04-news.ops.worldnet.att.net>,
John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>I can't explain the earlier test (which I mentioned in the message of
>20061012 0317Z), where the attached gif file worked. I believe I used a
>Debian computer in the basement which may have had that host listed as
>"special" in readers.conf at the time.
Incidentally, there's nothing you can do in readers.conf that
will bypass the Cleanfeed checks.
>"A News (NNTP) error occurred: 437 Attached HTML file"
Okay, that's what I needed to know.
So you're seeing this error not because of the attached image,
but because of how the newsreader is encoding the textual part of
the post that's going along with the image. I'm not sure this is
something you should allow out onto greater Usenet, but if it's
only for use in your local hierarchies, and it works with the
newsreaders that your users use (without making the text part of
the message incomprehensible to some users), I guess you can
patch the source to allow it. Let's see...there we go.
You should probably read about the "unified diff" format so you
can figure out how to apply these changes to your Cleanfeed.
This adds an allow_mime_html setting that works like the
allow_html setting you already know.
--- /usr/local/news/cleanfeed/filter_innd.pl 2002-11-20 18:57:55.000000000 -0500
+++ /tmp/filter_innd.pl 2006-10-16 21:50:09.000000000 -0400
@@ -128,6 +128,9 @@
### HTML allowed here (if block_html or block_multi_alt is turned on)
html_allowed => '^microsoft\.',
+ ### MIME HTML allowed here (if block_mime_html is turned on)
+ mime_html_allowed => '',
+
### groups where we restrict crossposts even more than normal
low_xpost_groups => 'test|jobs|forsale',
@@ -223,7 +226,7 @@
# config_append adds to the config regexps
if (%config_append) {
foreach (qw(bin_allowed bad_bin md5exclude poison_groups
- allexclude html_allowed low_xpost_groups no_cancel_groups
+ allexclude html_allowed mime_html_allowed low_xpost_groups no_cancel_groups
baddomainpat phl_exempt supersedes_exempt
refuse_messageids net_abuse_groups spam_report_groups
adult_groups not_adult_groups faq_groups faq_subjects
@@ -452,6 +455,7 @@
$gr{binary}++ if $config{bin_allowed} and /$config{bin_allowed}/o;
$gr{bad_bin}++ if $config{bad_bin} and /$config{bad_bin}/o;
$gr{html}++ if $config{html_allowed} and /$config{html_allowed}/o;
+ $gr{mime_html}++ if $config{mime_html_allowed} and /$config{mime_html_allowed}/o;
$gr{poison}++ if $config{poison_groups}
and /$config{poison_groups}/o;
$gr{reports}++ if $config{spam_report_groups}
@@ -479,6 +483,7 @@
$gr{binary} = ($gr{binary} == scalar @groups);
$gr{binary} = 0 if $gr{bad_bin};
$gr{html} = ($gr{html} == scalar @groups);
+ $gr{mime_html} = ($gr{mime_html} == scalar @groups);
$gr{allmod} = ($gr{mod} == scalar @groups);
# If all newsgroups are excluded from filtering, bail now
@@ -645,7 +650,7 @@
# mime-encapsulated HTML (attached *.html file)
return reject('Attached HTML file')
- if $config{block_mime_html}
+ if $config{block_mime_html} and not $gr{mime_html}
and $hdr{'Content-Disposition'} =~ /filename.*\.html?/
or $hdr{'Content-Base'} =~ /file:.*\.html?/
or ($lch{'content-type'} =~ m#multipart/(?:mixed|related)#
--
Jeffrey M. Vinocur
jeff@litech.org
Re: Cleanfeed config to allow HTML and binary attachments
Author: Jeffrey M. Vinocur
Date: Tue, 17 Oct 2006 02:20
Date: Tue, 17 Oct 2006 02:20
17 lines
1680 bytes
1680 bytes
In article <eh1ebc$d4c$5@puck.litech.org>, Jeffrey M. Vinocur <jeff@litech.org> wrote: > >This adds an allow_mime_html setting that works like the >allow_html setting you already know. I got mixed up here, it should say that it adds a mime_html_allowed setting like the html_allowed setting you already know. Incidentally, I didn't actually test that patch, so no guarantees...and if it gives you any trouble, please let me know. -- Jeffrey M. Vinocur jeff@litech.org
Re: Cleanfeed config to allow HTML and binary attachments
Author: John F. Morse
Date: Tue, 17 Oct 2006 02:48
Date: Tue, 17 Oct 2006 02:48
561 lines
23276 bytes
23276 bytes
Jeffrey M. Vinocur wrote:
>In article <4WSYg.73790$QZ1.22699@bgtnsc04-news.ops.worldnet.att.net>,
>John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>
>>I'd sure like to know why you think this. I need to learn why, and I
>>hope you don't consider my inquiry to mean I dispute what you say. I'm
>>just very curious, and want to learn the nuts and bolts so I can better
>>help myself (and others) in the future.
>>
>>I'm not trolling or looking for any argument. I'm just curious why my
>>testing using the final arbitrator -- the computer -- seems to run this
>>script OK, but you feel it cannot be trusted.
>>
>>
>
>Okay, let me tackle this first to get it out of the way, and then
>I'll try to get through the rest of the post.
>
>You're essentially saying, "Why bother having configuration files
>and settable options, when I can just make changes directly to
>the source code?"
>
>This is a question that has long been settled, which is why
>essentially every software package of any substance has a system
>of some kind to allow the user to configure it without modifying
>the source.
>
>Here are a couple reasons off the top of my head:
>
> (1) The software can be more robust if the developer sets out
> clearly where modifications should take place, rather than
> having to try to write code that will work even when
> changes are made to it by someone who doesn't understand
> the assumptions underlying it.
>
> (2) When it comes time to upgrade to a new version, it's much
> easier to figure out what customization you've done when
> it's all set out in a separate file, rather than having to
> extract it back out from the source and reapply those
> changes to the new version.
>
> (3) When talking to other people about your configuration, it's
> easier to communicate clearly by describing the settings
> you're using, rather than the changes you've made to the
> source code.
>
>Your testing may be enough to convince you that #1 isn't a
>problem for you, and well and good. But #2 is the problem that
>I'm worried about down the road. And probably we're having #3 as
>we speak.
>
Ah ha! I see your point(s) now!
My balking was primarily (probably all) due to my looking at the two
Perl files and considering them as "configuration" files (files of options).
I really didn't consider these Perl files (file.pl) as a source or
source code, although they are the source of the commands and variables
for Perl -- which I considered the "software" or "source code."
With that in mind, I could add the code to the local.pl file, then add
the pointer to point to it in the filter_innd.pl file.
But maybe I've already done this?! Perhaps I have something
misconfigured from the git-go, but Cleanfeed still processed, making me
believe I have everything correct?
Let me show you what I actually have, and have been using for the past
few months (please keep an eye on my shell commands to determine where I
am). This is lengthy, but necessary to show what I have. In any reply,
please delete all but the first couple of lines of each file (so I can
tell which file is which).
john@Wintergreen18:~$ ssh optima7
Password:
Linux optima7 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i586 GNU/Linux
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No mail.
Last login: Mon Oct 16 16:47:37 2006 from wintergreen18.my.net
john@optima7:~$ cd /etc/news
john@optima7:/etc/news$ ls -al
total 376
drwxr-xr-x 3 root root 1248 2006-09-16 20:04 .
drwxr-xr-x 98 root root 5456 2006-08-28 19:24 ..
-rw-r--r-- 1 root root 162 2006-07-16 14:44 actsync.cfg
-rw-r--r-- 1 root root 158 2006-07-15 10:33 actsync.cfg_original
-rw-r--r-- 1 root root 326 2006-07-15 09:33 actsync.cfg_test
-rw-r--r-- 1 root root 1120 2006-07-16 15:14 actsync.ign
-rw-r--r-- 1 root root 382 2006-07-15 09:01 actsync.ign_original
-rw-r--r-- 1 root root 304 2006-06-18 13:01 buffindexed.conf
-rw-r--r-- 1 root root 53067 2006-08-30 18:03 cleanfeed
-rw-r--r-- 1 root root 7397 2006-06-24 05:28 cleanfeed.conf_original
-rw-r--r-- 1 root root 87179 2006-06-18 13:01 control.ctl
-rw-r--r-- 1 root root 859 2006-06-18 13:01 cycbuff.conf
-rw-r--r-- 1 root root 495 2006-06-18 13:01 distrib.pats
-rw-r--r-- 1 root root 1536 2006-09-16 19:59 expire.ctl
drwxr-xr-x 2 root root 416 2006-10-01 11:45 filter
-rw-r--r-- 1 root root 5510 2006-09-16 20:01 incoming.conf
-rw-r--r-- 1 root root 4960 2006-07-21 18:40 inn.conf
<snip>
john@optima7:/etc/news$ less cleanfeed
# vim: set tabstop=4 shiftwidth=4 autoindent smartindent smarttab
syntax=perl:
#
# Copyright 1999 Jeremy Nixon <jeremy@exit109.com>
# Copyright 2001 Marco d'Itri <md@linux.it>
#
# This software is distributed under the terms of the Artistic License.
# Please see the LICENSE file in the distribution.
#
# CHANGE THE BELOW SETTING!
# Directory where cleanfeed.local and the other configuration files live.
# Set this to undef to not use any external file.
#Changed below 20060627 by JFM
#$config_dir = '/news/bin/filter';
#To
$config_dir = 'etc/news/bin/filter';
##############################################################################
# Server configuration
#
# Set $MODE according to what you're running.
# Acceptable values: inn, highwind.
# If you are running a highwind-like server then the value set here is
ignored
# and the default from highwind.pl is used.
$MODE ||= 'inn';
##############################################################################
# WARNING: NO USER SERVICEABLE PARTS BELOW THIS LINE
# IF YOU WANT TO CHANGE SOMETHING, PLEASE USE cleanfeed.local
##############################################################################
# default configuration
sub get_config {
%config = (
verbose => 1, # verbose rejection reasons in
news.notice/logfile?
aggressive => 1, # set to 0 if your
lawyers are paranoid
maxgroups => 14, # maximum number of
groups in a crosspost
block_binaries => 1, # block misplaced binaries
block_late_cancels => 0, # block cancels of rejected articles
block_user_spamcancels => 1,# reject spam cancels with X-Trace
or N-P-H
block_user_cancels => 0, # accept only spam cancels
block_extra_reposts => 1, # block reposts for articles not
cancelled
do_md5 => 1, # do the md5 checks?
do_phl => 1, # do the
posting-host/lines EMP check?
do_fsl => 1, # do the
from/subject/lines EMP check?
do_scoring_filter => 1, # use the scoring filter?
do_emp_dump => 1, # dump EMP histories to
a file for persistence?
emp_dump_file => '', # file to dump EMP histories to
MD5RateCutoff => 5, # reject if this many
copies are in the history
MD5RateCeiling => 85, # only count this high
MD5RateBaseInterval => 7200,# How long to wait before
decrementing the count
PHLRateCutoff => 20,
PHLRateCeiling => 80,
PHLRateBaseInterval => 3600,
FSLRateCutoff => 20,
FSLRateCeiling => 40,
FSLRateBaseInterval => 1000,
fuzzy_md5 => 1, # screw around with the
body before md5ing?
fuzzy_max_length => 700, # don't screw with bodies over
this many lines
md5_max_length => 2000, # don't md5 articles over this
many lines
trim_interval => 900, # trim hashes every N seconds
stats_interval => 3600, # write status file every N seconds
MIDmaxlife => 4, # time to keep rejected
message-ids, in hours
md5_skips_followups => 1, # avoid MD5 check on articles
with References?
do_mid_filter => 1, # use the message-id
CHECK filter? (INN only)
do_supersedes_filter => 1, # do the excessive supersedes
filter?
drop_useless_controls => 1, # drop sendsys, senduuname,
version control msg
drop_ihave_sendme => 1, # drop ihave, sendme control
messages
low_xpost_maxgroups => 6, # max xposts in low_xpost_groups
meow_ext_maxgroups => 2, # max xposts from meow_groups to
other groups
binaries_in_mod_groups => 0, # allow binaries in moderated
groups?
max_encoded_lines => 15, # number of encoded binary lines
to allow
block_mime_html => 1, # block MIME encapsulated HTML
(attached files)
# (NOT
straight or multipart/alternative)
block_html => 1, # block text/html but
not multipart/alternative
block_multi_alt => 0, # block multipart/alternative
articles
active_file => '', # active file to determine which groups
are moderated
# Logging and pid_file don't work for INN (uses news.notice)
log_directory => '',
log_name => '',
log_accepts => 0, # include
accepted articles in the log?
max_log_size => 0,
rotate_file => '', # rotate log if
this file exists
keep_old_logs => 7, # how many old
logfiles to keep
pid_file => '',
# crude stats on what the filter is doing
statfile => '',
html_statfile => '',
inn_syslog_status => 0, # status to syslog
(late-model INN only)
timer_info => 1, # timing information
(arts/second) in status report?
debug_batch_directory => '', # directory for debugging batches
debug_batch_size => 0, # max size of batch
files before rotation
### binaries allowed if groups match
bin_allowed => '^\w+\.binae?r|^alt\.sex\.pictures|^fur\.artwork'.
'|^alt\.anonymous\.messages$|^de\.alt\.dateien|^rec\.games\.bolo$'.
'|^comp\.security\.pgp\.test$|^sfnet\.tiedostot'.
'|^fido\.|^linux\.|^unidata\.',
### no binaries allowed even if bin_allowed matches
bad_bin => '\.d$|^alt\.chello',
### md5 EMP check not done if groups match
md5exclude => '\.test(?:$|\.)|^es\.pruebas$',
### reject all articles crossposted to groups matching this
poison_groups => '^alt\.(?:binaires|bainaries)|sexzilla|^newsmon$'.
'|h[i\d]pcl[o\d]ne|h\.i\.p\.c\.r\.i\.m\.e'.
($] >= 5.005 ? '|(?<!free\.)h[i\d]pcr[i\d]m[e\d]'
:
'|^alt\.hipcrime|^us\.hipcrime|^hipcrime|h\dpcr\dme'),
### no checks done if groups match
allexclude => '^clari\.|^biz\.clarinet\.',
### HTML allowed here (if block_html or block_multi_alt is
turned on)
This appears to be the original Cleanfeed script. There are no changes
to the HTML and binary stuff, but notice the "$config_dir =
'etc/news/bin/filter';" near the top.
But is this actually the correct file for this location? Check this out:
john@optima7:/etc/news$ less cleanfeed.conf_original
# Cleanfeed configuration file
sub local_config {
### !! WARNING !! YOU CAN & MUST SET ONLY ONE OF THE FOLLOWING:
$inn = 1; # set $inn = 1 for INN
$highwind = 0; # set $highwind = 1 for Cyclone/Typhoon/Breeze
$nntprelay = 0; # set $nntprelay = 1 for NNTPRelay
%config_local = (
# Settings in %config_local will OVERRIDE any defaults
# in Cleanfeed.
#
# Any setting here will blindly replace one with the
# same name in %config. No sanity checks are done.
# Be careful!
#
# On/off settings should be set to 1 for on, 0 for off
### Setting aggressive to 0 disables all content-based filters
'aggressive' => 1,
### Active file
#'active_file' => undef,
'active_file' => '/var/lib/news/active',
#Above by JFM 20060623
#########################################################
<snip>
That looks totally different. Perhaps I originally moved (renamed)
something incorrectly? I remember having trouble figuring out Cleanfeed
back in the early summer.
Let's take a look inside the filter directory:
john@optima7:/etc/news$ cd filter
john@optima7:/etc/news$ cd filter
john@optima7:/etc/news/filter$ ls -al
total 286
drwxr-xr-x 2 root root 416 2006-10-01 11:45 .
drwxr-xr-x 3 root root 1248 2006-09-16 20:04 ..
-rw-r--r-- 1 root root 47159 2006-06-23 07:39
filter_innd_ORIGINAL_CLEANFEED.pl
-rw-r--r-- 1 root root 6124 2006-06-18 13:01 filter_innd_ORIGINAL.pl
-rw-r--r-- 1 root root 53102 2006-10-01 11:45 filter_innd.pl
-rw-r--r-- 1 root root 53127 2006-10-01 11:12 filter_innd.pl.20061001
-rw-r--r-- 1 root root 53070 2006-07-28 14:22 filter_innd.pl_WORKED_OK
-rw-r--r-- 1 root root 2263 2006-06-18 13:01 filter_nnrpd.pl
-rw-r--r-- 1 root root 4177 2006-06-18 13:01 nnrpd_access.pl
-rw-r--r-- 1 root root 2653 2006-06-18 13:01 nnrpd_auth.pl
-rw-r--r-- 1 root root 1336 2006-06-18 13:01 startup_innd.pl
john@optima7:/etc/news/filter$
The "filter_innd.pl.20061001" is the one that had the groups listed
individually.
The "filter_innd.pl_WORKED_OK" is the same file before I added the
individual groups.
The "filter_innd_ORIGINAL_CLEANFEED.pl" is a copy of the Version
0.95.7b 3 September 1998 file
The "filter_innd_ORIGINAL.pl" is $Id: filter_innd.pl,v 1.4 2000/04/04
23:40:09 rra Exp $
All of these four are simply stored here. Is this a problem?
With the hook set in /etc/news/cleanfeed wouldn't it appear that the
following file would be considered "cleanfeed.local"?
john@optima7:/etc/news/filter$ less filter_innd.pl
# vim: set tabstop=4 shiftwidth=4 autoindent smartindent smarttab
syntax=perl:
#
# Copyright 1999 Jeremy Nixon <jeremy@exit109.com>
# Copyright 2001 Marco d'Itri <md@linux.it>
#
# This software is distributed under the terms of the Artistic License.
# Please see the LICENSE file in the distribution.
#
# CHANGE THE BELOW SETTING!
# Directory where cleanfeed.local and the other configuration files live.
# Set this to undef to not use any external file.
#Changed below 26600627 by JFM
#$config_dir = '/news/bin/filter';
#To
$config_dir => 'undef';
##############################################################################
# Server configuration
#
# Set $MODE according to what you're running.
# Acceptable values: inn, highwind.
# If you are running a highwind-like server then the value set here is
ignored
# and the default from highwind.pl is used.
$MODE ||= 'inn';
##############################################################################
# WARNING: NO USER SERVICEABLE PARTS BELOW THIS LINE
# IF YOU WANT TO CHANGE SOMETHING, PLEASE USE cleanfeed.local
##############################################################################
# default configuration
sub get_config {
%config = (
verbose => 1, # verbose rejection reasons in
news.notice/logfile?
aggressive => 1, # set to 0 if your
lawyers are paranoid
maxgroups => 5, # maximum number of groups
in a crosspost [was 14 JFM]
block_binaries => 1, # block misplaced binaries
block_late_cancels => 0, # block cancels of rejected articles
block_user_spamcancels => 1,# reject spam cancels with X-Trace
or N-P-H
block_user_cancels => 0, # accept only spam cancels
block_extra_reposts => 1, # block reposts for articles not
cancelled
do_md5 => 1, # do the md5 checks?
do_phl => 1, # do the
posting-host/lines EMP check?
do_fsl => 1, # do the
from/subject/lines EMP check?
do_scoring_filter => 1, # use the scoring filter?
do_emp_dump => 1, # dump EMP histories to
a file for persistence?
emp_dump_file => '', # file to dump EMP histories to
MD5RateCutoff => 5, # reject if this many
copies are in the history
MD5RateCeiling => 85, # only count this high
MD5RateBaseInterval => 7200,# How long to wait before
decrementing the count
PHLRateCutoff => 20,
PHLRateCeiling => 80,
PHLRateBaseInterval => 3600,
FSLRateCutoff => 20,
FSLRateCeiling => 40,
FSLRateBaseInterval => 1000,
fuzzy_md5 => 1, # screw around with the
body before md5ing?
fuzzy_max_length => 700, # don't screw with bodies over
this many lines
md5_max_length => 2000, # don't md5 articles over this
many lines
trim_interval => 900, # trim hashes every N seconds
stats_interval => 3600, # write status file every N seconds
MIDmaxlife => 4, # time to keep rejected
message-ids, in hours
md5_skips_followups => 1, # avoid MD5 check on articles
with References?
do_mid_filter => 1, # use the message-id
CHECK filter? (INN only)
do_supersedes_filter => 1, # do the excessive supersedes
filter?
drop_useless_controls => 1, # drop sendsys, senduuname,
version control msg
drop_ihave_sendme => 1, # drop ihave, sendme control
messages
low_xpost_maxgroups => 6, # max xposts in low_xpost_groups
meow_ext_maxgroups => 2, # max xposts from meow_groups to
other groups
binaries_in_mod_groups => 0, # allow binaries in moderated
groups?
max_encoded_lines => 15, # number of encoded binary lines
to allow
block_mime_html => 1, # block MIME encapsulated HTML
(attached files)
# (NOT
straight or multipart/alternative)
block_html => 1, # block text/html but
not multipart/alternative
block_multi_alt => 0, # block multipart/alternative
articles
active_file => '', # active file to determine which groups
are moderated
# Logging and pid_file don't work for INN (uses news.notice)
log_directory => '',
log_name => '',
log_accepts => 0, # include
accepted articles in the log?
max_log_size => 0,
rotate_file => '', # rotate log if
this file exists
keep_old_logs => 7, # how many old
logfiles to keep
pid_file => '',
# crude stats on what the filter is doing
statfile => '',
html_statfile => '',
inn_syslog_status => 0, # status to syslog
(late-model INN only)
timer_info => 1, # timing information
(arts/second) in status report?
debug_batch_directory => '', # directory for debugging batches
debug_batch_size => 0, # max size of batch
files before rotation
### binaries allowed if groups match
bin_allowed => '^\w+\.binae?r|^alt\.sex\.pictures|^fur\.artwork'.
'|^alt\.anonymous\.messages$|^de\.alt\.dateien|^rec\.games\.bolo$'.
'|^comp\.security\.pgp\.test$|^sfnet\.tiedostot'.
'|^fido\.|^linux\.|^unidata|^xanadu\.|^xanadu\.test',
### no binaries allowed even if bin_allowed matches
bad_bin => '\.d$|^alt\.chello',
### md5 EMP check not done if groups match
md5exclude => '\.test(?:$|\.)|^es\.pruebas$',
### reject all articles crossposted to groups matching this
poison_groups => '^alt\.(?:binaires|bainaries)|sexzilla|^newsmon$'.
'|h[i\d]pcl[o\d]ne|h\.i\.p\.c\.r\.i\.m\.e'.
($] >= 5.005 ? '|(?<!free\.)h[i\d]pcr[i\d]m[e\d]'
:
'|^alt\.hipcrime|^us\.hipcrime|^hipcrime|h\dpcr\dme'),
### no checks done if groups match
allexclude => '^clari\.|^biz\.clarinet\.',
### HTML allowed here (if block_html or block_multi_alt is
turned on)
html_allowed => '^microsoft\.|^xanadu\.',
john@optima7:/etc/news/filter$
This is the file I modified.
This doesn't make sense to me (nor you, I presume).
If these two files are reversed, how is Cleanfeed working?
Where is cleanfeed.local?
john@optima7:/etc/news/filter$ sudo updatedb
Password:
john@optima7:/etc/news/filter$ locate cleanfeed.local
/home/john/Downloads/cleanfeed-0.95.7b/cleanfeed.local.ex
/home/john/Downloads/cleanfeed-20020501/cleanfeed.local.sample
/home/john/Downloads/cleanfeed-20020501/cleanfeed.local.sample-it
john@optima7:/etc/news/filter$
These appear to be only samples.
Ideas?
--
John
Re: Cleanfeed config to allow HTML and binary attachments
Author: John F. Morse
Date: Tue, 17 Oct 2006 03:16
Date: Tue, 17 Oct 2006 03:16
137 lines
6747 bytes
6747 bytes
Jeffrey M. Vinocur wrote:
>In article <4WSYg.73790$QZ1.22699@bgtnsc04-news.ops.worldnet.att.net>,
>John F. Morse <xanadu.bbs@invalid.net> wrote:
>
>
>>I can't explain the earlier test (which I mentioned in the message of
>>20061012 0317Z), where the attached gif file worked. I believe I used a
>>Debian computer in the basement which may have had that host listed as
>>"special" in readers.conf at the time.
>>
>>
>
>Incidentally, there's nothing you can do in readers.conf that
>will bypass the Cleanfeed checks.
>
>
Thanks for that info.
>>"A News (NNTP) error occurred: 437 Attached HTML file"
>>
>>
>
>Okay, that's what I needed to know.
>
>So you're seeing this error not because of the attached image,
>but because of how the newsreader is encoding the textual part of
>the post that's going along with the image. I'm not sure this is
>something you should allow out onto greater Usenet, but if it's
>only for use in your local hierarchies, and it works with the
>newsreaders that your users use (without making the text part of
>the message incomprehensible to some users), I guess you can
>patch the source to allow it. Let's see...there we go.
>
>
It is local only. It does not fail without the attachment, even though
it (the text) is an HTML message containing two inserted images (the
same inserted file as the attached file).
HTML messages do post OK, except when there is a file attachment (at
least tested with a jpg attachment -- which shouldn't make that filetype
unique).
I could try attaching the jpg to a text-only (non-HTML) message, but
that is a rare method of posting.
Usenet is full of attached files. They have their purpose, and they
supposedly have their place. Cleanfeed catches those that are "out of
place."
I'm not going to argue pro or con about Usenet filling up with what
should be on an FTP server, or a Web server. That is not my calling.
My users use a wide assortment of newsreaders. There is no guarantee, so
assumptions are dangerous. The safest assumption is to assume the vast
majority, mostly elderly, still use Outlook Express, with
Mozilla/Thunderbird coming in second. A few Windows users will use
Gravity, Agent or 40tude, or old Netscape. Mac users will use whatever
they can get. A few Linux/BSD people use Pan, Knews or KNode. I know of
nobody who uses the text-only readers, like slrn, trn, etc., with the
exception of trying them out, and returning to something that will
handle the HTML (and image) messages that are popular in these local
groups for the past 12 or so years.
>You should probably read about the "unified diff" format so you
>can figure out how to apply these changes to your Cleanfeed.
>
>This adds an allow_mime_html setting that works like the
>allow_html setting you already know.
>
>
>--- /usr/local/news/cleanfeed/filter_innd.pl 2002-11-20 18:57:55.000000000 -0500
>+++ /tmp/filter_innd.pl 2006-10-16 21:50:09.000000000 -0400
>@@ -128,6 +128,9 @@
> ### HTML allowed here (if block_html or block_multi_alt is turned on)
> html_allowed => '^microsoft\.',
>
>+ ### MIME HTML allowed here (if block_mime_html is turned on)
>+ mime_html_allowed => '',
>+
> ### groups where we restrict crossposts even more than normal
> low_xpost_groups => 'test|jobs|forsale',
>
>@@ -223,7 +226,7 @@
> # config_append adds to the config regexps
> if (%config_append) {
> foreach (qw(bin_allowed bad_bin md5exclude poison_groups
>- allexclude html_allowed low_xpost_groups no_cancel_groups
>+ allexclude html_allowed mime_html_allowed low_xpost_groups no_cancel_groups
> baddomainpat phl_exempt supersedes_exempt
> refuse_messageids net_abuse_groups spam_report_groups
> adult_groups not_adult_groups faq_groups faq_subjects
>@@ -452,6 +455,7 @@
> $gr{binary}++ if $config{bin_allowed} and /$config{bin_allowed}/o;
> $gr{bad_bin}++ if $config{bad_bin} and /$config{bad_bin}/o;
> $gr{html}++ if $config{html_allowed} and /$config{html_allowed}/o;
>+ $gr{mime_html}++ if $config{mime_html_allowed} and /$config{mime_html_allowed}/o;
> $gr{poison}++ if $config{poison_groups}
> and /$config{poison_groups}/o;
> $gr{reports}++ if $config{spam_report_groups}
>@@ -479,6 +483,7 @@
> $gr{binary} = ($gr{binary} == scalar @groups);
> $gr{binary} = 0 if $gr{bad_bin};
> $gr{html} = ($gr{html} == scalar @groups);
>+ $gr{mime_html} = ($gr{mime_html} == scalar @groups);
> $gr{allmod} = ($gr{mod} == scalar @groups);
>
> # If all newsgroups are excluded from filtering, bail now
>@@ -645,7 +650,7 @@
>
> # mime-encapsulated HTML (attached *.html file)
> return reject('Attached HTML file')
>- if $config{block_mime_html}
>+ if $config{block_mime_html} and not $gr{mime_html}
> and $hdr{'Content-Disposition'} =~ /filename.*\.html?/
> or $hdr{'Content-Base'} =~ /file:.*\.html?/
> or ($lch{'content-type'} =~ m#multipart/(?:mixed|related)#
>
>
I'll try and find "unified diff" and read up on it. Unless you have a
better link, I'll start here:
http://www.google.com/search?hl=en&q=unified+diff&btnG=Google+Search
Thanks for this info, Jeff. I do appreciate all of your effort.
--
John
Re: Cleanfeed config to allow HTML and binary attachments
Author: John F. Morse
Date: Tue, 17 Oct 2006 03:22
Date: Tue, 17 Oct 2006 03:22
30 lines
2155 bytes
2155 bytes
Jeffrey M. Vinocur wrote: >In article <eh1ebc$d4c$5@puck.litech.org>, >Jeffrey M. Vinocur <jeff@litech.org> wrote: > > >>This adds an allow_mime_html setting that works like the >>allow_html setting you already know. >> >> > >I got mixed up here, it should say that it adds a >mime_html_allowed setting like the html_allowed setting you >already know. > >Incidentally, I didn't actually test that patch, so no >guarantees...and if it gives you any trouble, please let me know. > OK. I'll wait until you have a chance to comment on the long message (20061017 02:48:27 GMT) showing what file(s) I have where. That may be the problem, or at least causing the unusual placement of the script(s). -- John
Re: Cleanfeed config to allow HTML and binary attachments
Author: Jeffrey M. Vinocur
Date: Tue, 17 Oct 2006 12:02
Date: Tue, 17 Oct 2006 12:02
60 lines
3954 bytes
3954 bytes
In article <%vXYg.74713$QZ1.58022@bgtnsc04-news.ops.worldnet.att.net>, John F. Morse <xanadu.bbs@invalid.net> wrote: > >My balking was primarily (probably all) due to my looking at the two >Perl files and considering them as "configuration" files (files of options). Right, because Perl doesn't have a separate compilation stage to make you draw a clear distinction. But for cleanfeed, there is definitely source code (the file that says "no user-servicable parts below this line") and configuration, and it's probably best to maintain that. Oh, I thought of a #4, by the way. If you make your local config changes to the source code, you'll make it impossible to apply patches (like the one I wrote you to add mime_html_allowed) automatically, because the "patch" program won't recognize where the modifications should be made. >Let me show you what I actually have, and have been using for the past >few months (please keep an eye on my shell commands to determine where I >am). This is lengthy, but necessary to show what I have. In any reply, >please delete all but the first couple of lines of each file (so I can >tell which file is which). Okay, you're confused. The way the filtering infrastructure works is, INN uses whatever file is named filter_innd.pl in the $pathfilter directory. That file is free to reference other files as it desires, but INN itself knows nothing else. Cleanfeed has two files, one I'll call the "main" file (which says WARNING: NO USER SERVICEABLE PARTS BELOW THIS LINE in it) and one I'll call the "config" file that doesn't. (The defining feature of the config file is that somewhere in the middle it has a section called "sub local_config".) So when you use Cleanfeed, you "install" the main cleanfeed script by renaming it to filter_innd.pl and putting it in $pathfilter. You then edit that script to tell it where to keep its config files, and put the config file there, naming it cleanfeed.local. The main script -will- be looking in the location you provided for cleanfeed.local and using it. As far as I can tell, it looks like you've got the main script installed as filter_innd.pl, plus another copy (which will be completely ignored and you should probably stash away somewhere else to avoid confusion). Then you've got a config file that cleanfeed will never be able to find because it's not called cleanfeed.local. Remember that neither INN nor Cleanfeed is magic -- they're looking for files with specific names in specific locations, and having other stuff lying all over the place may convince you that it's doing something, but won't be used by anything in real life. -- Jeffrey M. Vinocur jeff@litech.org
Re: Cleanfeed config to allow HTML and binary attachments
Author: Dr.Ruud
Date: Thu, 19 Oct 2006 07:50
Date: Thu, 19 Oct 2006 07:50
17 lines
1840 bytes
1840 bytes
Jeffrey M. Vinocur schreef: > Perl doesn't have a separate compilation stage to > make you draw a clear distinction. Heheh, it actually has! Start all your Perl-scripts with #!/usr/bin/perl use warnings ; use strict ; and you'll notice it more often, because Perl will try to help you. -- Affijn, Ruud "Gewoon is een tijger."
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