Webhosting Blog


Service: [exim] has been disabled by the sys admin

Service: [exim] has been disabled by the sys admin

Trying to restart exim on the cPanel server issues as mentioned above.

This issue arises as the exim service is disabled in WHM>> Service Manager >> Exim.  So if you face the above error login to the WHM of the server and enable the service from the Service Manager. Now when you try to restart the service you should not face any error.

Store Copy of Incoming/Outgoing Emails

You can easily monitor the incoming or outgoing emails for all the email accounts for a domain without any BCC entry. You can simply use the following filters for this.
Add following code in the Exim system filter file (/etc/cpanel_exim_system_filter.)

Lets make a backup copy of the current filters so we can restore the same in case if there are issues with the newly configured filters.

# cp -a /etc/cpanel_exim_system_filter /etc/cpanel_exim_system_filter-orig

Assuming that the incoming emails for all the email accounts under the domain and outgoing emails from the email accounts from the domain are stored in different email accounts , we will add 2 different email accounts.
For example:
outgoing@domain.com Will be used to store the outgoing emails from the domain email accounts.
incoming@domain.com Will be used to store the incoming emails for the domain email accounts.

Open the file /etc/cpanel_exim_system_filter and add the following lines at the end of the file:

########### Filter to locate the emails for the domain with fields TO, CC, BCC having the domain name included ###############
if (“$h_to:, $h_cc:, $h_bcc” contains “domain.com”)
unseen deliver “incoming@domain.com”

########### Filter to locate the emails sent from the domain ##############
if $sender_address_domain is domain.com
unseen deliver “outgoing@domain.com”

Just restart the exim service and now you can get a copy of all the incoming and outgoing emails from the domain .

# service exim restart

In WHM ensure the filters are enabled from Main >> Service Configuration >> Exim Configuration Editor .

You can refer THIS URL to track outgoing emails in cPanel without BCC.

Account Creation Status: failed. Your system has run out of available ip addresses, or you do not have permission to use any more ip addresses.

Above error normally is due to packages added on the server .

Please check the package assigned for the domains, the package  added might be by default created with dedicated IP.

To resolve the issue  remove the package and recreate the package with Dedicated IP option deselected .

Now try adding an account from WHM with defined package. It should be added now.

/var/spool/exim/db/retry: unexpected file type or format

You might face problems in receiving the emails in the inbox. Checking the email logs you can find the error logs as follows :

2012-02-19 12:45:17 Berkeley DB error: /var/spool/exim/db/ratelimit: unexpected file type or format
2012-02-19 12:45:17 failed to open DB file /var/spool/exim/db/ratelimit: Bad file descriptor
2012-02-19 12:45:17 H=xxx.xxxx.xxxx [] temporarily rejected connection in “connect” ACL: ratelimit database not available
2012-02-19 12:45:17 Berkeley DB error: /var/spool/exim/db/ratelimit: unexpected file type or format

The above error is basically due to exim database on the server being corrupted. You can follow the follow the following steps for this:

First stop the exim service

[root@support ~]#/etc/init.d/exim stop

[root@support ~]#cd /var/spool/exim

We will create a backup of the current exim DB.

[root@support exim]# cp -R db/ db-bak

[root@support exim]# cd db/

We will remove all the files currently existing in the folder.

[root@support db]#  rm -rf *

Now restart the exim service so the DB is auto created.

[root@support ~]# /etc/init.d/exim start

The emails should now be working fine on the server !


Enabling APC on cPanel server

What is APC:

The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code. Apart from caching opcode cache it provides a user cache for storing application data.

Installing APC on cPanel server :

Before installing APC on the server ensure eAccelerator is enabled on the server .

root@server [~]# php -m | grep eAccelerator

Now lets install APC on the server . Follow the following commands on the server :

root@mailspec [~]# cd /usr/local/src

root@mailspec [~]# wget http://pecl.php.net/get/APC-3.0.19.tgz

root@mailspec [~]# tar -xzf APC-3.0.19.tgz && cd APC-3.0.19

root@mailspec [~]# phpize && ./configure –enable-apc –enable-apc-mmap –with-apxs=/usr/local/apache/bin/apxs –with-php-config=/usr/local/bin/php-config && make && make install

This should now configure APC and install it in your extension directory.

root@mailspec [~]# cd /usr/local/lib/php/extensions/no-debug-non-zts-200XXXX

You can locate a  file named apc.so in that directory.

You can now locate an entry for apc.so in the file /usr/local/lib/php.ini.


If you want to view APC interface via browser you can copy the file /usr/lib/php/apc.php into your sites documentroot path and access it via the browser. Ensure GD is installed on the server to view APC interface via the browser.

You can try accessing the URL:: http://domain.com/apc.com to view the interface

(replace the domain.com with your original domain name )

It will show you interface similar as follows :

Correcting Nameserver IP’s in cPanel

You might observe wrong nameservers IP allocated when you check the nameserver IP allocation from WHM>>  Main >> DNS Functions >> Nameserver IPs. 

You can correct these IP’s simple with following:

1 ) Check the file /etc/nameserverips. It should show you something as follows:

Correct the entries here if the entries are not as per expectation.

2)Now open the file /var/cpanel/nameserverips.yaml.

It should display you settings as follows

ns1.domain.com: “”: 1
count: ‘1’ zones:
ns2.domain.com: “”: 1
count: ‘1’
zones: domain.com

Edit the settings here as well if they are incorrect. Once done restart the cPanel service .

Now check the nameserver IP’s from WHM>> Main >> DNS Functions >> Nameserver IPs.  It should now be corrected.

Unable to open version.txt: No such file or directory at /usr/sbin/csf

If you face problems while starting the CSF firewall on the server and get the following mentioned error

Unable to open version.txt: No such file or directory at /usr/sbin/csf line 1773.

This error is basically due to the CSF version file missing on the server. To sort this issue you can simply follow the following steps:

1) Go to folder /etc/csf

[root@server~]# cd /etc/csf

2) Create a text file in this folder with name “version.txt”

[root@server csf]# vi version.txt

3) Simply insert the CSF version number in this file eg: 5.17 & assign the ownership of root.root to the file

[root@server csf] chown root.root version.txt

4)Once done assign the permission of 600 to the file

[root@server csf] # chmod 600 version.txt

5) Now just restart your CSF

[root@server~]# csf -r

This should now sort your issue.