Has anyone developed some recipes or have ideas on how to implement a
way to reject people who quote a message and add just a few lines!
Some people quotes whole digests, rarely though, but others quote
entire messages added just one or too sentences.
How about something like this:
# Set MINNONQUOTED to the minimum number of unquoted lines
MINUNQUOTED=2
# Set MAXRATIO to the maximum ratio of quoted to unquoted lines,
# multiplied by 100 (scaled by two decimals).
# If there are 30 quoted lines and 15 unquoted, the ratio would
# be 200 (ie: 2/1 * 100).
MAXRATIO=15
# Set QUOTE1CHARS to the characters which can occur as the
# start of quoting characters
QUOTE1CHARS='>|'
# Set QUOTE2CHARS to the characters which can follow the
# leading quote characters. It's a good idea to include
# a blank in this set.
QUOTE2CHARS='>| '
:0 B # count unquoted lines of text
* $ 1^0 !^[$QUOTE1CHARS][$QUOTE2CHARS]*
{ UNQUOTED=$= }
:0 B # count quoted lines of text
* $ 1^0 ^[$QUOTE1CHARS][$QUOTE2CHARS]*
{ QUOTED=$= }
:0 B
* $ ^[$QUOTE1CHARS][$QUOTE2CHARS]*
* $ -$MINUNQUOTED^0
* $ $UNQUOTED^0
* 1^0
{ REJECT=y }
RATIO=`expr $QUOTED * 100 / $UNQUOTED`
:0 EB
* $ ^[$QUOTE1CHARS][$QUOTE2CHARS]*
* $ -$MAXRATIO^0
* $ $RATIO^0
{ REJECT=y }
# AT this point, if REJECT is y, then reject the mail by whatever
# policy you choose.
I haven't thought this through very carefully, so feel free to
shoot some holes in it..
___________________________________________________________
Alan Stebbens <aks(_at_)sgi(_dot_)com> http://reality.sgi.com/aks