On August 11, 2003 at 22:04, Warren Stevens wrote:
I'm having problems with /var/mail locks. If I copy my mbox into
.newmail (to try testing things out) and have a message to be
processed in the archive's mailbox, then run "make readmail" I get the
/usr/bin/lockfile -r5 -l3600 .newmail.lock 2>/dev/null
/usr/bin/lockfile -l3600 -ml
lockfile: Try praying, giving up on "/var/mail/wstevens.lock"
system /usr/bin/lockfile -l3600 -ml failed: 17664
This message indicates I don't have permissions; I asked my sysadmin
about this, and he said "lock something else, we don't have
Then what do you have? I.e. What do regular mail clients work
with in your environment?
From your previous message, it appears qmail is being used for
mail delivery, therefore, your mail is in maildir format. If this
is the case, you need a script to generate a mailbox from
maildir before having mharc process the data.
Another solution is replace the filter-spool part with a script
that calls procmail directly on messages in maildir directory using
procmail.mharc as the rc file. The following is a quick shell script
that may work (this is untested):
# Process messages in new
for i in $maildir/new/*; do
if [ procmail -m procmail.mharc < $i ]; then
# If no error, move message to cur
mv $i $maildir/cur/`basename $i`:2,S
echo "Warning: Procmail returned non-zero status ($?) for $i"
$maildir represents that pathname to your qmail directory. You
may still want to create a general lock (using lockfile) for
the process like filter-spool does (the ".newmail.lock") as
a semaphore to prevent multiple invocations of the script from
stepping on each other.
This second approach should be more efficient since it avoids
creating an intermediate mailbox file.
Note, to avoid having a bunch of old messages cluttering up
$maildir/cur, you can have a cron job that cleans it up on a periodic
If you decide to replace filter-spool, you will need to adjust
your crontab so it does not call the read-mail script, but call
the replacement script followed by the web-archive script.
P.S. Ideally, mharc itself would have a script (say "filter-maildir"
or a modified filter-spool) that it invokes itself for maildir stored
messages. Maildir support is on the TODO list.
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHARC-USERS