Posts Tagged ‘Spam’

Rspamd, bayes expiry and Redis – ERR Number of keys can’t be greater than number of args

Wednesday, August 15th, 2018

I recently enabled the bayes expiry module ( in Rspamd and found myself staring at the following error in the Rspamd logs with no idea what it meant:

lua; bayes_expiry.lua:332: cannot perform expiry step: ERR Number of keys can’t be greater than number of args

The only reference that I could find to this online was a single post on the Rspamd mailing list, which had gone unanswered (

It turns out that I had the “expire” setting defined twice inĀ /etc/rspamd/local.d/classifier-bayes.conf. After fixing this, restarting Rspamd and waiting a couple of minutes, I started to see the expected log entries from the bayes expiry module executing its expiry processing step every minute:

lua; bayes_expiry.lua:368: finished expiry step 9995 (lazy): 1001 items checked, 163 significant (0 made persistent), 0 insignificant (0 ttls set), 0 common (0 discriminated), 838 infrequent (837 ttls set), 4 mean, 20 std


Missing Junk mailbox in Apple Mail

Tuesday, August 19th, 2014

When setting up a new MacBook Pro recently, I was impressed that all of my mail account settings were synced over via iCloud, but somewhat surprised and confused to find that the “Junk” mailbox for all accounts was missing.

I couldn’t find the “Junk” mailbox anywhere – it wasn’t in the list of special folders (Drafts, Sent, Trash etc.) with the Inbox and it wasn’t in the list of general mailboxes – it had seemingly just vanished.

This is particularly annoying for me as I used Zimbra for my mail server and can train the server side junk mail filters by moving messages in and out of the special “Junk” mailbox.

All of the junk mail settings in Apple Mail were enabled and seemed to match those in the same version of Apple Mail on my old laptop, so what was happening?

It seems that when you have the junk mail setting in Apple mail set to “Mark as junk mail, but leave it in my Inbox”, Apple hides the “Junk” mailbox to start with whilst it trains its filters and then only shows it once they have sufficient data built up to start identifying spam.

A quick work around to get the “Junk” mailbox to show up straight away is to change the junk mail setting in Apple Mail from “Mark as junk mail, but leave it in my Inbox” to “Move it to the Junk mailbox” and back again.

Changing this setting causes the “Junk” mailbox to be shown and the mailbox doesn’t get hidden again when you change it back.