Great Circle Associates Majordomo-Workers
(October 2002)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: messages quantity limiting
From: "Dariusz" <visatos @ centras . lt>
Date: Wed, 30 Oct 2002 02:36:34 +0200
To: <majordomo-workers @ greatcircle . com>
Importance: Normal

Hello,

it seems that Majordomo does not have subj. function.
In lists with "hot" themes such function may be very useful. Some people
like writing but not reading. In my believe subj. can be power that could
make polemic more constructive. If I have such list managing tool, my life
would be much easier.

I know perl a litle bit, so here how I imagine script doing such thing.
Treat it just like an idea:

##########
# $email -- email of subscriber
# $path -- path to directory that holds current list data
# $limit -- quantity limit (value can be retrieved from config file of the
current list)


@time = localtime;
$file = $path.$time[5].sprintf("%.02u", $time[4]+1).sprintf("%.02u",
$time[3]).'.txt';

 open (FILE,$file);
 foreach $m (<FILE>)
  {
   if ($m eq $email)
   {
   $count += 1;
   }
  }
  close FILE;

  if ($count >= $limit)
  {
   do bounce; # calls bounce script
  }
  else
  {
   open (FILE,">>$file");
   flock (FILE, 2);
   print FILE "$email\n";
   flock (FILE, 8);
   close FILE;
  }






Follow-Ups:
Indexed By Date Previous: Re: Majordomo: help with sendmail sub
From: Lee Leahu <lee@ricis.com>
Next: Re: messages quantity limiting
From: Jason L Tibbitts III <tibbs@math.uh.edu>
Indexed By Thread Previous: Re: Majordomo: help with sendmail sub
From: Lee Leahu <lee@ricis.com>
Next: Re: messages quantity limiting
From: Jason L Tibbitts III <tibbs@math.uh.edu>

Google
 
Search Internet Search www.greatcircle.com