Spamd keeps failing
There are a few reasons spamd may be failing. A common reason is due to quota. If a user has hit their quota limit spamd under that user may cause high cpu usage.
First, run top and watch for spamd processes. It will show the cpu usage and the user running it.
top - 10:12:17 up 63 days, 12:53, 2 users, load average: 12.80, 9.43, 9.52 Tasks: 188 total, 2 running, 180 sleeping, 3 stopped, 3 zombie Cpu(s): 54.2% us, 3.7% sy, 0.7% ni, 2.8% id, 37.7% wa, 0.2% hi, 0.8% si Mem: 4091936k total, 3930972k used, 160964k free, 46104k buffers Swap: 6201028k total, 35768k used, 6165260k free, 2799704k cached PID USER PR NI %CPU TIME+ %MEM VIRT RES SHR S COMMAND 2558 bps 25 0 90 1:34.46 0.7 31288 28m 2076 R spamd
In this cause the first process was spamd by user bps. The CPU usage is 80%.
Now check the quota with quota -u
root@server [~]# quota -u bps Disk quotas for user bps (uid 32080): Filesystem blocks quota limit grace files quota limit grace /dev/md1 61440* 61440 61440 1455 0 0
It says 61440* blocks in use. The * means the quota has been reached or exceeded.
Raising the quota will fix the error. In this case the quota is 60 MB, to fix I have raised it to 70MB.
root@server [~]# /scripts/editquota bps 70M
Then restarted spamd with