[Mimedefang] ADMINISTRIVIA: Excessive quoting
David F. Skoll
dfs at roaringpenguin.com
Tue Oct 22 17:42:00 EDT 2002
Hi,
I've noticed that a lot of posts on this list excessively quote earlier
posts.
I've now implemented a filter (written in MIMEDefang, of course!) which
helps me reject postings with either (1) more than 60 lines of quoted
material, or (2) less than 50% new material.
Please trim your postings!
Thanks,
David.
P.S. Here's the snippet from the filter:
sub too_much_quoting {
if (!open(IN, "<INPUTMSG")) {
return 0;
}
my($quote, $total);
$quote = 0;
$total = 0;
while(<IN>) {
$quote++ if (/^\s*>/);
$total++;
}
close(IN);
return 0 if ($total == 0);
return 1 if ((1.0 * $quote) / (1.0 * $total) >= 0.5) or ($quote >= 60);
return 0;
}
# ...
# Next bit is inside filter_begin. Mailman is configured to hold
# messages with specified header.
if ($ToMDList && too_much_quoting()) {
action_add_header("X-Hold-For-Approval", "Too much quoting");
}
More information about the MIMEDefang
mailing list