How to restart cPanel spamd and reinstall SpamAssassin
Sometimes you will get notifications from cPanel whenever a service goes down. One of those that I find is the most common would be spamd. If you have notifications setup on your cPanel server for spamd you probably have gotten an email similar to this before:
Types of Errors
spamd failed @ DATE. A restart was attempted automagically. Cmd service check raw output: Spamd is not running
If you check the cPanel mail logs you should probably find something similar to this as well:
1 2 3 4 |
tail /var/log/maillog | grep spamd May 13 22:37:35 hostname spamc[24624]: connect to spamd on 127.0.0.1 failed, retrying (#2 of 3): Connection refused May 13 22:37:36 hostname spamc[24624]: connect to spamd on 127.0.0.1 failed, retrying (#3 of 3): Connection refused May 13 22:37:37 hostname spamc[24624]: connection attempt to spamd aborted after 3 retries |
One thing I always try first is to restart the service, you can issue this SSH command to restart the spamd service:
1 |
/scripts/restartsrv_spamd |
If you have problems with locating that script I would browse the /scripts directory and see what is in there similar to this one. You can also use an editor to open the script file and that should give you more insight into exactly what it does. You can also supply the –status argument and you should see something similar to this:
1 2 |
/scripts/restartsrv_spamd --status spamd (/usr/local/bin/spamd -d --allowed-ips=127.0.0.1 --pidfile=/var/run/spamd.pid --max-children=3 --max-spare=1) running as root with PID 24884 (pidfile check method) |
Reinstall SpamAssasin
I have had instances where I would get errors when trying to restart it, and reinstalling SpamAssassin helped out.
1 2 3 |
/scripts/perlinstaller Digest::SHA1 /scripts/perlinstaller --force Mail::SpamAssassin /etc/rc.d/init.d/exim restart |
Force cPanel Update
You can also try forcing cPanel to update to the latest version:
1 |
/scripts/upcp --force |
-
Andrew_@