[Mimedefang] Bayes errors in logfile
Kris Deugau
kdeugau at vianet.ca
Fri Aug 12 13:38:19 EDT 2005
"Cormack, Ken" wrote:
> Aug 12 10:53:52 mail01 mimedefang-multiplexor[9340]: Slave 9 stderr:
> lock: 9340 unlink of temp lock
> /var/spool/MIMEDefang/bayes.lock.mail01.mydomain.com.9340 failed: No
> such file or directory
> Aug 12 10:53:52 mail01 mimedefang-multiplexor[9340]: Slave 9 stderr:
> Cannot open bayes databases /var/spool/MIMEDefang/bayes_* R/W: lock
> failed: No such file or directory
> Aug 12 11:27:12 mail01 mimedefang-multiplexor[22720]: Slave 6 stderr:
> lock: 22720 unlink of temp lock
> /var/spool/MIMEDefang/bayes.lock.mail01.mydomain.com.22720 failed: No
> such file or directory Cannot open bayes databases
> /var/spool/MIMEDefang/bayes_* R/W: lock failed: No such file or
> directory
The locking errors are usually related to Bayes autolearn and/or expiry
conflicts. A wander through the SA list archives should turn up quite a
few threads.
> The bayes configuration lines in my sa-mimedefang.cf look like this:
>
> # Enable Bayes
> use_bayes 1
> use_bayes_rules 1
> bayes_path /var/spool/MIMEDefang/bayes
> bayes_file_mode 0700
> bayes_auto_learn 1
>
> Does anyone have any ideas or suggestions? Mail seems to be flowing,
> but I'm concerned/confused about the logged errors.
They're not really fatal errors - all they say is that one process tried
to do something to the Bayes db, but another was already doing a similar
task - learning or expiry.
You can get rid of them fairly simply. Add these two lines to
sa-mimedefang.cf:
bayes_learn_to_journal 1
bayes_auto_expire 0
(You might want to check the man page to make sure those are valid -
there should be something similar if not. I'm still happily running
2.64.)
Then set up a cron job to run sa-learn --rebuild --force-expire as user
defang regularly. (For the systems I've been administering, once a day
has worked very well for several years now.) I just use a single line
in /etc/crontab:
02 5 * * * defang /usr/bin/sa-learn --rebuild --force-expire
This isn't specific to MIMEDefang; it applies to any sitewide
file-based Bayes setup.
-kgd
--
Get your mouse off of there! You don't know where that email has been!
More information about the MIMEDefang
mailing list