Re: Looking to share cost of MHonArc customisation

2003-12-14 19:01:46
On Sun, 14 Dec 2003 13:38:43 -0800 (PST) 
Earl Hood <earl(_at_)earlhood(_dot_)com> wrote:
--- J C Lawrence <claw(_at_)kanga(_dot_)nu> wrote:

This doesn't inherently need a modification to MHonArc.  Just wrap
your call to MHonArc in a script which runs `du` against the target
directory, adds in the computed size of the current message and then
does The Right Thing.

But what exactly is "The Right Thing"?

That was the point.  It is entirely contextual: delete oldest, delete
attachment, refuse to archive, etc.

Various solutions exist to get the size of messages outside of mhonarc
(attachments and a little twist, but is manageable).  However, the
trick is how to tell mhonarc to delete older messages until the total
archive size is below max bytes size.  I do not see an efficient
solution to this that does not require hooking into mhonarc itself or
performing your own bookkeeping of messages (duplicating some of what
mhonarc does).

If the Right Thing encludes deleting a message already in the archive
the brute force approach would be to delete the archive and regen it.

BTW, external-based processing would may need to deal synchronization
issues.  I.e. Some form of external locking is needed on the archive
to avoid multiple processes from accessing the archive.  Something
like Procmail's lockfile could be used to manage this.

Yup.  Sometimes I assume too much as this is exactly what I do.

J C Lawrence
---------(*)                Satan, oscillate my metallic sonatas.
claw(_at_)kanga(_dot_)nu               He lived as a devil, eh?  Evil is a name of a foeman, as I live.

<Prev in Thread] Current Thread [Next in Thread>