DSpam cgi running slowly in web browser
Further to my post about DSPAM Suexec problems I also ran into a further problem recently with our DSPAM server……
We get A LOT of mail through this system and when I say a lot I mean s***loads, the last count was 51 million emails processed in 9 months!!!! Anyway, DSPAM uses a set of perl cgi scripts to generate the web interface which while it works, certainly isn’t cut out for performance. These cgi scripts use the system.log to build its history and quarantine views and if you still want to be able to use the web interface then you will have to start pruning the system.log file on a regular basis.
Rotate system.log
DSPAM comes with a handy little script that can be run from cron, called dspam_logrotate. To run it manually and keep the last 7 days worth of history data (you may need to alter the various paths depending on your platform):-
dspam_logrotate -v -a 7 -l /var/db/dspam/system.log -d /var/db/dspam
Now your web interface should run at a non-frustrating pace :).
Automating through cron
My crontab now contains the following lines to keep the last 7 days worth of data:-
# purge system.log once a week
1 1 * * 6 root /usr/local/bin/dspam_logrotate -v -a 7 -l /var/db/dspam/system.log -d /var/db/dspam
Other Speed Tweaks
From the DSPAM Mailing List an interesting Ajax patch written by Yoon Kit Yong to help manage your history items may be worth a try (http://mailing-list.nuclearelephant.com/7385.html). I haven’t actually given it a bash yet but when I get some time I will give it a go, if anyone out there has already used it then let me know what you think.
