🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Dmitry Sat, 22 May 2004 16:51
simple filter for DNEWS administrator
#69213
Author: 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
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