🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #69213

simple filter for DNEWS administrator

#69213
From: Dmitry
Date: Sat, 22 May 2004 16:51
74 lines
3315 bytes
###############################################################
# DNEWS 5.7 B1
#
# Simple rules for reject binary files and common spam message
# Version 1.0
#
# Caccia Carlo  dmitry@x-privat.org
#
# Usage: into newsfeeds.conf
#
# site me
#	groups *
#	rules c:\dnews\myfile.rul
#
# warning: Use this set only for non-binary newsfeeder
#
###############################################################

----myfile.rul---

# reject HTML and Binary files

   if  ishtml() reject "HTML not allowed"
   if  isbinary()reject "Binary not allowed"

# reject common virus attachment

   if (attach("*.scr")) reject "Attachment not allowed"
   if (attach("*.pif")) reject "Attachment not allowed"
   if (attach("*.lnk")) reject "Attachment not allowed"
   if (attach("*.cmd")) reject "Attachment not allowed"
   if (attach("*.bat")) reject "Attachment not allowed"


   if (lines()>8000) and (size()<40000) \
    	reject "=== Lots of short lines"

# uuencoded html, text, url files

   if (lines()>3) and (lines()<350) then
      if (isencodedtext()) reject "=== UUEncoded text/html"
      if (isencodedurl()) reject "=== UUEncoded url"
   end if

# mime-encapsulated HTML

      if (rexp("Content-Disposition","filename.*\.html?")) \
    	    	reject "=== Misc HTML spam"

      if (rexp("Content-Base","file:.*\.html?")) \ 
    	    	reject "=== Misc HTML spam"

      if (rexp("content-type","multipart\/(mixed|related)")) and \
	   (isencodedhtml()) reject "=== Misc HTML spam"

# HTML (and multipart/alternative)

      if (rexp("content-type","text\/html|multipart\/alternative")) \
     	    	reject "=== HTML post"

	if (rexp("content-type", "multipart\/(mixed|related)")) \ 
    	    	and (isencodedhtml())reject "=== HTML post"


# if we got past all those then accept the message
   accept "Article OK"

----Eof----

-- 
Ciao, Dmitry

FIAG - Free It-Alt Group  ~   http://www.fiag.it
X-PLANET Community        ~   http://www.x-planet.org
Technical Details
Message-ID: <40af8330@x-privat.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.20140818.mbox.gz!number1.nntp.dca.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!tiscali!newsfeed1.ip.tiscali.net!nntp.eutelia.it!news.newsland.it!x-privat.org!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <40af8330@x-privat.org>
Subject: simple filter for DNEWS administrator
Date: Sat, 22 May 2004 18:51:24 +0200
From: Dmitry <dmitry@x-privat.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.20140818.mbox.gz!number1.nntp.dca.giganews.com!internal1.nntp.sjc.giganews.com!border2.nntp.sjc.giganews.com!border1.nntp.sjc.giganews.com!nntp.giganews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.tiscali.de!tiscali!newsfeed1.ip.tiscali.net!nntp.eutelia.it!news.newsland.it!x-privat.org!not-for-mail
Newsgroups: news.software.nntp
User-Agent: Xnews/06.08.25
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Face: #]Qz-k@#W9*1Gk%t4z20u-abQr6A491)|`]@8r+Fy?x76-9`"g6CxZcr(,=|#jN$,IKRd;
 2
 D5nk}(z\?r12A,$W<o]R:xq]42FL{Nd@6xutIrT!L_COBKxi#0d$6Lr\UQov0JZWg\y-k&R0gH$n}^
 mu*RWZdN5%f
X-PGP-Key: 01E40B31
Reply-To: dmitry@x-privat.org
NNTP-Posting-Host: 81.72.107.119
X-Trace: x-privat.org 1085244208 81.72.107.119 (22 May 2004 18:43:28 +0200)
Organization: X-Privat NNTP Server - www.x-privat.org
Lines: 74
X-Complaints-To: abuse@x-privat.org