I've had a problem for a while now where mail gets stuck in the Exim queue, because SpamAssassin keeps timing out. I eventually got round to looking into it, and it turns out that it was actually timing out while expiring old ‘tokens’ from the Bayesian filtering database. The answer is to turn off this auto expiring feature, according to someone on the mailing list, with this in local.cf:
bayes_auto_expire 0
Then to prevent the database (which for me lives in ~/.spamassassin/) from growing forever, set up a cron job something like this:
#!/bin/sh sa-learn --force-expire --sync >/dev/null
So far it's worked perfectly. I got a big batch of work email today, and not a one was left sitting in the queue.