Products Downloads Prices Support Company
Index FAQ Configs Feeds In Feeds Out Feeds Out  

External Spam Filter Support - Adding Cleanfeed to DNews

You may also be interested in the built in rules based filtering system or NoCem support. For a summary of spam options see this page.

Installation Instructions

  1. Install DNews 5.1a or later
  2. Download the latest cleanfeed to a local directory, e.g. c:\dnews\clean, cleanfeed is available from or
  3. In dnews.conf add this line (or similar depending on where you install the cleanfeed files)
    (NT)    filter_cmd c:\perl\bin\perl.exe c:\dnews\clean\cleanfeed
    (UNIX) filter_cmd /usr/local/dnews/clean/cleanfeed
  4. If you are on NT install perl on your computer, apparently a free one is available from or you may find one on the NT resource kit.
  5. In the main cleanfeed script file define $config_dir to where you have installed cleanfeed, e.g. c:\dnews\clean
  6. In cleanfeed.conf set the system types to '1', depending on your system, NT has all three, UNIX just the top two.
        $inn = 1;      
        $highwind = 1;  
        $nntprelay = 1;  # set to 1 for NT, 0 for unix
  7. If you want logging define that in cleanfeed.conf, and make sure you specify a full path
  8. Start DNews, and check the logs, see if it's accepting 'some' items :-)

Note: To change the filter, you will have to stop and start DNews, tellnews reload is not sufficient.


Cleanfeed is a perl script so it will increase your CPU use and may slow down DNews although you might gain as much as there will be less 'junk' for DNews to process.   If performance is affected consider using dmulti so user performance isn't affected. Also the built in spam protection in DNews does much of what cleanfeed does, please don't install cleanfeed unless you really want it for some reason.

Using other filters

You can roll your own filter, or use other standard filters that follow the same mechanism that cleanfeed uses.  A filter is any program that reads the message on STDIN and responds on STDOUT with either "235\r\n" to accept a message or "435\r\n" to reject a message.

Here is a user contributed filter which you may find useful when writing your own filtering system, thanks to Jay Berg for this contribution.

On NT the file handle stdin must be set to binary to preserve the \R\N, but stdout should not be set to binary, or if binary mode is used an extra character should be sent (6 in total instead of 5). 

Please note: If DNews locks up, try removing your filter particularly if it's not a standard one.

You may also be interested in the rules based filtering system or NoCem support.

If you want to run multiple filters then look at this: which is a mechanism for doing just that.