Re: Submission Quota?

Doug Mansfield <[email protected]>
Newsgroups gmane.mail.smartlist.user
Message-ID <1554224.1034238879@MANSFIELD>

--On Wednesday, October 09, 2002 9:19 PM +0200 Werner Reisberger 
<[email protected]> wrote:

> Does anybody ever wrote something like a quota mechanismn for postings? I
> want to limit the number of postings for certain people, i.e. list member
> bigmouth can only send 7 postings per month while other subscribers can
> post  unlimited.

This is what I did, I just use a cron job to reset the wholog at whatever 
interval I want.  It limits a user to three posts (ends up 6 per day).  I 
put it in rc.local.s10 in both the list and digest.  The first line checks 
to make sure they aren't counted twice (once for the list and twice for the 
digest or vise-versa).

###########################################################################
#  Check if the poster has exceeded their quota
###########################################################################

:0
* !Received: \(from lists@localhost\)
{
 FROMWHO = `$FORMAIL -rtzxTo:`

 :0ci:
 | $ECHO $FROMWHO >> $WHOLOG

 NUMWHO = `fgrep -wic "$FROMWHO" $WHOLOG`

 :0
 * -3^0
 * $$NUMWHO^0
 | ($FORMAIL -rkbt -I"From: List Manager <lists@...>" -i"X-Loop: list@..."; 
cat error-quota.txt) | $SENDMAIL -oi -t
}


Doug
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.