Restricting crossposts
Sven Paulus
sven at karlsruhe.org
Mon Nov 18 19:55:26 UTC 2002
Lisa Ungar <lungar at us.ibm.com> wrote:
>> There are a certain newsgroups where I do not want to have any crossposts
>> allowed.
Are these groups within one hierarchy?
Then you could use the following filter function in your
${NEWSBIN}/filter/filter_innd.pl:
sub filter_art {
foreach (split(/,/, $hdr{"Newsgroups"})) {
if (/^myhier\./) {
$a++;
} else {
$b++;
}
}
# if you want to restrict crossposts between myhier.* and other
# hierarchies use this:
return "Don't crosspost to myhier.*" if ($a && $b);
# if you want to restrict crosspost within myhier.* use this
return "Don't crosspost within myhier.*" if ($a > 1);
return "";
}
Of course you can replace the regular expression by one which matches
group names (like /^(group\.name\.one|group\.name\.two)$/, etc.).
>> Is this possible to do in the existing newsfeed file using one of the
>> options in the innfeed program (eg. Gcount)? or does one need to use a
>> tool named cleanfeed to restrict the crossposts?
Of course you could use cleanfeed for this, too, but it takes some
time to configure, so maybe using a self-written little perl filter
like the one above might be the easiest solution.
Sven
More information about the inn-workers
mailing list