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
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
Work around
All you have to do is follow the below two steps.
1) Stop the service
/etc/init.d/exim stop
or
service exim stop
2) Create an empty file called “eximdisable” under “/etc”
touch /etc/eximdisable
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.