mharc-users

Re: filter-spool

2003-02-22 16:41:14
On February 22, 2003 at 16:35, Peter Bowen wrote:

I'm trying to understand how mharc process mail, and I'm a little
confused.  Is there a reason that the MTA doesn't call procmail itself,
rather than delivering the mail to the mail spool, then having a cron
job process the spool?  

A problem with this is file locking.  When web-archive is reading
the the files under $MBOX_DIR, you do not want procmail delivery
messages to those files.  This is why mharc does things they
way it currently does.  The interaction between mharc and the MTA
is very minimal, reducing any bottlenecks and critical area problems.

The same reasoning is whe delivery spool file is not processed
directly.  This can create a bottleneck because the file will need
to be locked so the MTA does not delivery anything, but if there
are many messages, there could be a significant delay until the lock
is released.

Therefore, mharc copies the spool file first before filtering
into $MBOX_DIR.  After the copy, it release the lock on the spool
(after clearing the file) so the MTA can continuing delivering messages
while mharc finishes updating the archives.  Of course, this model
assumes a mailbox-type delivery spool, which is the tradtional format
for Unix/sendmail systems.

For your case, an alternate version of filter-spool could read messages
from a maildir and pipe them into procmail using the procmailrc.mharc
file instead of it processing a mailbox file.  Basically, it grabs
all messages in <maildir>/new for piping into procmail.  When a
message is successfully filtered, it is removed from <maildir>/new.
An additional admin task of cleaning up files in <maildir>/tmp that
are more than 3 days old could also be done.

Ideally, the above functionality is a configurable option in config.sh
that tells filter-spool if it is processing a mailbox vs a maildir
(or it auto-detects by checking if $ORGMAIL is a file or a directory).

--ewh

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHARC-USERS

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