Oh... Oh dear god... Oh HOLY SHIT.... always at 2:30 in the fucking morning...
It's a disaster. A bloody pig's breakfast it is!
Apparently my dspam maintenance scripts have been "not running" for about... 9 months. I have 9 months worth of stale data in the system.
I just purged 13742670 hysterical tokens from the system (tokens with < 5 hits that are older than 2 months).
Let's look at that number again: 13,742,670. 13 MILLION, 742 Thousand, 670.
That's just ONE table.
The system is purging 4 more tables. Then it has to vacuum (with this much shit, I may have to offline postgres to vacuum).
I've turned off sendmail. There's NO WAY it's going to be able to deliver anything while this is running (in fact sendmail was shitting itself because it couldn't get answers from dspam within 5 minutes and shit was stacking up in the mail queue). Better to have the secondary MX and remote sites queue this shit than beat up an already upset server...
On the bright side, I know why dspam has been so goddamn slow - apparently the purge script doesn't work and you HAVE to use the SQL purge. Fixing this is priority #2 (right after getting the database cleaned up so performance stops sucking)).