web analytics

Blog

How to Disable auto restart of Exim on cPanel servers

Tags: chkservdcPaneleximWHM

Published on: April 25, 2016 by Manu M.

How to Disable auto restart of Exim on cPanel servers

Scenario:

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.

Category : Howtos, Linux

Manu M.

Manu M.

Manu has been with us for past one and half years and is a person with good technical skills and domain knowledge. Being a highly athletic personality, Manu likes to play Cricket and Badminton of all games whenever he gets time off. Apart from his technical and athletic abilities, he is a good writer and has tried his hands on penning a few poems of his own. He believes in the mantra that "small things matter the most" and this nature can also visible in his blogs and writings.

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Get new updates

Categories

$0.000 items