mhonarc-users

Re: expireage problem w/Mhonarc 2.1

1997-09-12 10:01:48
Earl, a heads up,

I been examining this code segment so I could hack a fix for the problem
I uncovered back in June(see attached note). Further examination has
uncovered another problem. Here it is:

If a user is sorting the archive with the "-subsort" option and has MAXSIZE
set, mhonarc will start removing messages from the top of the archive until
the archive is smaller than MAXSIZE. Since the archive is sorted by 
subject, and mhonarc starts deleting at the top, this means that recent
messages could be deleted. 

Another words, with subsort and MAXSIZE on, mhonarc will not delete
messages in a FIFO order as one would hope.

Thanks...........Paul Sala   psala(_at_)btv(_dot_)ibm(_dot_)com

-------------------------------------------
Earl Hood's Reply to Paul Sala's note of June 13 1997:

Earl, I have found the problem in:

  ## Remove old message if hit maximum size or expiration
   .
   .
   while ($index = shift(@array)) {
    last  unless
            ($MAXSIZE && ($NumOfMsgs > $MAXSIZE)) ||
            (&expired_time(&get_time_from_index($index)));
    &delmsg($index);
   .
   .

This code checks the database for expired msgs starting at the 1st item 
in the
database. If that 1st item is not expired, then checking for expired msgs
halts. 

You are right.  When you mentioned the problem I took a quick look at
this area of the code and knew something was amiss.  If I am not
mistaken, there is another problem with the related code area.  Do not
know why I did not catch it before; must have been smoking something.
 
The problem arises when a user is using the -subsort option. With the db
sorteded by subject and not by date, the oldest msg is not at the top of
the db. Thus, when the db is checked for expired msgs, mhonarc sees the 
1st one is not expired and checking for expired msgs is incorrectly 
halted.

Yep.

If you confirm this as true, is this something you would address in your 
next release?

Sure.  I should note that I am currently very busy on a project
so it maybe a little while.  Also, I will be out-of-state most
next week, and possible the week after that.

      --ewh





<Prev in Thread] Current Thread [Next in Thread>
  • Re: expireage problem w/Mhonarc 2.1, Paul J. Sala <=