Stop receiving emails.
Stop the SpamAssassin service once the incoming mail spool is empty.
Then kill all vestiges of spamd or spamassassin that might still be
running from previously improperly terminated sessions.
Then run sa-learn.
If it STILL hangs with this lock you'd a problem somewhere "fer shure".
Once sa-learn is run then restart spamassassin and restart your email
reception process.
Do NOT kill lockfiles while SpamAssassin is running. That invites
database corruption.
Is it possible the 1500 messages all at once triggers a potential
Bayes database expiration about half way through the pass and that
is what is getting it hung up? I'll leave it to the authors to
address that potential. It seems unlikely.
{^_^}
----- Original Message -----
From: "Jonathan Nie" <[EMAIL PROTECTED]>
Hi Matt,
I am new to spamassassin. Thank you so much for your help and Tyler too.
Bayes autolearn is enabled when I feed Bayes with the 1500 emails manually
using the "sa-learn" command. Does it cause the problem?
I also checked the Bayes database directory and found two stale lock files
"bayes.lock...". One is pretty old, almost 4 months and the other was
created during I feed bayes this time. Could I delete them?
Thanks again.
Jonathan
Jonathan Nie wrote:
Greetings!
I got a problem when I try to feed Bayes with large number of emails
(over 1500). It just hang there and I got the the following error
messages from maillog file:
.....bayes: cannot open bayes databases /spamassassin/bayes_* R/W: lock
failed: File exists
Does anyone know how to fix it?
SA believes another process is currently writing to the bayes database.
This
would be quite normal if a bayes expiry run was going on at the time.
Wait a while and see if it still happens.
If it still fails, shutdown ALL spamassassin operations, and try again.
If it *still* fails, manually delete the bayes lock file. (it will be in
your
bayes directory. I think it's called bayes.mutex)