[Mimedefang] Bayes lockfile problem

Kelson Vibber kelson at speed.net
Fri Dec 5 13:44:25 EST 2003


At 09:19 AM 12/5/2003, Per Björklund wrote:
>Dec  5 16:42:19 mailgw2 mimedefang-multiplexor: Slave 1 stderr: Cannot 
>open bayes databases /var/spool/spamassassin/bayes_* R/W: lock failed: 
>File exists

This is probably a result of SA (being run by a MD slave) rebuilding the 
Bayes database, running out of memory, and leaving the lock file sitting 
around.

If you limit the amount of memory available to each MD slave (check 
/etc/sysconfig/mimedefang or your init scripts), try increasing the limit 
and see what happens.

For those occasions when it does fail, the solution seems to be:
- Stop MIMEDefang
- Remove the lock file
- Rebuild the Bayes Database
- Restart MIMEDefang

This can be scripted, and you can set up a cron job to run it periodically 
or just when the error shows up more than X times in the mail logs.  We 
have a script that checks the end of the log every 10 minutes, although it 
hasn't been triggered since July.  Since increasing the memory for each MD 
slave, the problem has gone from several times a week to once every few 
months to - well, no hits in 5 months.


Kelson Vibber
SpeedGate Communications <www.speed.net> 





More information about the MIMEDefang mailing list