Lots of 'bayes_toks.expireNNNNN' files in the bayes_path directory
Is that directory set to use a sticky bit? check with 'ls':
ls -la /path/to/directory total 47576 drwxrwxrwt 1 root root 8192 2004-08-23 17:26 . [....] -rw-rw-rw- 1 calum calum 4155 2004-08-23 17:26 bayes_journal -rw-rw-rw- 1 nobody nogroup 2584576 2004-08-23 17:26 bayes_seen -rw-rw-rw- 1 root root 10244096 2004-08-23 17:26 bayes_toks -rw-rw-rw- 1 brian brian 5255168 2004-08-23 15:58 bayes_toks.expire13091 -rw-rw-rw- 1 calum calum 5255168 2004-08-23 16:08 bayes_toks.expire13925 -rw-rw-rw- 1 calum calum 5255168 2004-08-23 16:14 bayes_toks.expire14454 -rw-rw-rw- 1 calum calum 5255168 2004-08-23 16:29 bayes_toks.expire14922 -rw-rw-rw- 1 calum calum 5255168 2004-08-23 16:36 bayes_toks.expire15160
If the "drwx" string ends in a "t", the sticky bit is set. That can cause complications, as described in this Debian bug.
If SpamAssassin is running using different user IDs, but sharing the same Bayes database files, it needs to be able to rename files in this directory. Using the sticky bit means that user ID 'X' cannot move files created by user ID 'Y' -- hence the write fails, and SpamAssassin has to give up the expire operation, logging an error.
The fix is to remove the sticky bit:
chmod u-s /path/to/directory
You may want to investigate a way to lock down that directory, rather than leaving it at mode 0777, but that's outside the scope of this FAQ entry.
