[24819] in SIPB bug reports

home help back first fref pref prev next nref lref last post

spam-inc

daemon@ATHENA.MIT.EDU (Abbe Cohen Dvornik)
Sat May 14 17:23:28 2005

From abbe@MIT.EDU Sat May 14 21:23:27 2005
Return-Path: <abbe@MIT.EDU>
Delivered-To: bug-sipb-mtg@CHARON.mit.edu
Received: (qmail 6894 invoked from network); 14 May 2005 21:23:27 -0000
Received: from biscayne-one-station.mit.edu (18.7.7.80)
  by charon.mit.edu with SMTP; 14 May 2005 21:23:27 -0000
Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
	by biscayne-one-station.mit.edu (8.12.4/8.9.2) with ESMTP id j4ELNOQM003900
	for <bug-sipb@MIT.EDU>; Sat, 14 May 2005 17:23:24 -0400 (EDT)
Received: from multics.mit.edu (MULTICS.MIT.EDU [18.187.1.73])
	(authenticated bits=56)
        (User authenticated as abbe@ATHENA.MIT.EDU)
	by outgoing.mit.edu (8.12.4/8.12.4) with ESMTP id j4ELNGwU005682
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <bug-sipb@mit.edu>; Sat, 14 May 2005 17:23:17 -0400 (EDT)
Received: (from abbe@localhost) by multics.mit.edu (8.12.9)
	id j4ELNFss029133; Sat, 14 May 2005 17:23:15 -0400 (EDT)
Date: Sat, 14 May 2005 17:23:15 -0400 (EDT)
Message-Id: <200505142123.j4ELNFss029133@multics.mit.edu>
From: Abbe Cohen Dvornik <abbe@alum.MIT.EDU>
To: bug-sipb@MIT.EDU
Subject:  spam-inc
X-Spam-Score: -4.9
X-Spam-Flag: NO
X-Scanned-By: MIMEDefang 2.42


A few months ago I sent a bug report about the spam-inc script
failing to move spam to the spam folder if there were more than
998 spam messages being inc'd at once (because refile/rmm/etc 
choke when they get more than 998 messages.)

Being a lameass who has forgotten any sh scripting skills I had
before, I then proceeded to not fix it... until coming back from a
net-less vacation (yes, some crufty SIPB members can live without net
access for a week+ of downtime in Europe.. ;) and realizing a fix would
be useful.

So, I asked bert for help and he proposed the fix in
/mit/abbe/Public/spam-inc:

<         refile "+$SPAMFOLDER" spams;
---
> 
>       ## Plain "refile" fails if there are more than 998 messages!
>         #refile "+$SPAMFOLDER" spams;   # <-- this may break
>         SPAM_MSGS=`pick spams 2>/dev/null | head -990`
>       while [ -n "$SPAM_MSGS" ]; do
>             refile "+$SPAMFOLDER" $SPAM_MSGS
>             SPAM_MSGS=`pick spams 2>/dev/null | head -990`
>         done
> 


This fix worked for me on my 14000 new messages, not clear how much less
efficient it is (if any) and has not been thoroughly tested.
Please feel free to code review it and post an update to the sipb locker.

--Abbe

home help back first fref pref prev next nref lref last post