🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #74383

Re: Cleanfeed config to allow HTML and binary attachments

#74383
From: John F. Morse
Date: Mon, 16 Oct 2006 21:34
192 lines
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
Technical Details
Message-ID: <4WSYg.73790$QZ1.22699@bgtnsc04-news.ops.worldnet.att.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn12feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!17a21c27!not-for-mail
References: <O%STg.165050$QM6.101199@bgtnsc05-news.ops.worldnet.att.net> <_mEUg.185118$QM6.167675@bgtnsc05-news.ops.worldnet.att.net> <eghjl6$od6$1@puck.litech.org> <qSYWg.242888$QM6.16449@bgtnsc05-news.ops.worldnet.att.net> <egld06$5sk$1@puck.litech.org>

Show Full Headers
Complete Article Headers
Message-ID: <4WSYg.73790$QZ1.22699@bgtnsc04-news.ops.worldnet.att.net>
Subject: Re: Cleanfeed config to allow HTML and binary attachments
Date: Mon, 16 Oct 2006 21:34:56 GMT
From: "John F. Morse" <xanadu.bbs@invalid.net>
References: <O%STg.165050$QM6.101199@bgtnsc05-news.ops.worldnet.att.net> <_mEUg.185118$QM6.167675@bgtnsc05-news.ops.worldnet.att.net> <eghjl6$od6$1@puck.litech.org> <qSYWg.242888$QM6.16449@bgtnsc05-news.ops.worldnet.att.net> <egld06$5sk$1@puck.litech.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn12feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!17a21c27!not-for-mail
Reply-To: xanadu.bbs@invalid.net
Organization: Xanadu BBS
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040514
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: news.software.nntp
In-Reply-To: <egld06$5sk$1@puck.litech.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 192
NNTP-Posting-Host: 08df294d590be3bd38c7bcc6b9fa5f4f
X-Complaints-To: abuse@worldnet.att.net
X-Trace: bgtnsc04-news.ops.worldnet.att.net 1161034496
NNTP-Posting-Date: Mon, 16 Oct 2006 21:34:56 GMT