Published on: April 25, 2016 by Manu M.
This tweak is for cPanel installed servers. Consider you are using a cPanel server and you need to stop the mail service for a long period of time. As we know cPanel uses the famous Exim mail server and all we need to do is disable exim service. Some of you may have stopped this service and gets shocked when you see it back up and running after several hours. If you need a solution, you have come to the right place. I will tell you how to disable exim for long period. But before that you should know why the service came back even after you have stopped it. The explanation is in next paragraph.
chkservd is a little cPanel utility that allows you to check from WHM what applications it will monitor, and in case there is a problem with any of those services it will restart it and send a notification to the administrative account. So obviously, when chkservd finds exim stopped, it simply restarts the service. Now you know why :p
All you have to do is follow the below two steps.
1) Stop the service
service exim stop
2) Create an empty file called “eximdisable” under “/etc”
Now when you try to restart or start the exim service, you will get the following error.
/etc/init.d/exim status exim dead but subsys locked
That’s means it will remain stopped and “chkservd” can’t start it 😉
So if you ever found the error “exim dead but subsys locked”, now you know how to fix it. It’s simple. Just remove that “eximdisable” file.
rm -rf /etc/eximdisable
Hope this helps.
Category : Howtos, Linux