# vim: set syntax=perl ts=4 ai si: ######################### IMPORTANT! - READ CAREFULLY ######################## # This is a minimalistic cleanfeed.local which Italian sites can install # without much work. # Things which need to be configured are marked with XXX. # Don't forget to update $config_dir at the beginning of the cleanfeed file. ######################### IMPORTANT! - READ CAREFULLY ######################## sub local_filter_first { my $localpost = 0; ##### ##### XXX: change the following line to match your servers ##### $localpost = 1 if $hdr{'X-Trace'} and $hdr{'X-Trace'} =~ /\.inwind\.it /; study $hdr{__BODY__} if $hdr{__LINES__} <= 250; # local posts ############################################################ if ($localpost) { if ($hdr{Approved}) { foreach (@groups) { if (not /^alt\./) { saveart('CF.approved'); return reject("Forged approval in $_ ($hdr{Approved})"); } } } return reject('Non usare HTML in Usenet!') if $hdr{'Content-Type'} and ($hdr{'Content-Type'} =~ m#text/html# or $hdr{'Content-Type'} =~ m#multipart/alternative#); } ########################################################################## foreach (@groups) { $gr{it}++ if $hdr{Newsgroups} =~ /^it/; } # enforce it.* hierarchy restrictions if ($gr{it} and (@groups > 10 or @followups > 3)) { saveart('CF.ECP'); return reject('Excessive crosspost'); } } ##### ##### XXX: change the paths to suit your system ##### sub local_config { %config_local = ( block_late_cancels => 1, ##### ##### XXX only highwind users need one ##### # active_file => '/usr/local/news/common/active', statfile => '/usr/local/news/log/cleanfeed.stats', # html_statfile => '/usr/local/news/log/cleanfeed.stats.html', do_emp_dump => 1, emp_dump_file => '/usr/local/news/tmp/empdump', # debug_batch_directory => '/usr/local/news/spam', ); } print %config_local.@followups if 0; # lint food 1;