Webhosting Blog

Cpanel

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”)
then
unseen deliver “incoming@domain.com”
endif

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

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 [1.1.1.1] 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
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.

extension=”apc.so”

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:

10.1.1.1=ns1.domain.com

10.1.1.2=ns2.domain.com

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: “10.1.1.1”: 1
count: ‘1’ zones:
domain.com
ns2.domain.com: “10.1.1.2”: 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.


Mailman problems


After migrating the domain from one server to another server you might receive following error for the mailman lit:

“There currently are no publicly-advertised Mailman mailing lists
on XX.XX.XX.XX.To visit the administrators configuration page for
an unadvertised list, open a URL similar to this one, but with a ‘/’
and the right list name appended. If you have the proper authority,
you can also create a new mailing list.”

Use the following simple fix for this:

1) Navigate to the folder /usr/local/cpanel/3rdparty/mailman/bin

root@server # cd /usr/local/cpanel/3rdparty/mailman/bin

Following command will check the permissions for the mailing lists

root@server [/usr/local/cpanel/3rdparty/mailman/bin]# ./check_perms 

It will display something as follows:

directory permissions must be 02775: /usr/local/cpanel/3rdparty/mailman/archives/private/XX_domain.com/attachments/20101005/59ebfce0
Problems found: 1499
XX_domain.com : mailing list name

Either manually you can assign the permission as 02775 for the respective contents or simply fire following command to fix the errors:

root@server [/usr/local/cpanel/3rdparty/mailman/bin]# ./check_perms -f

This should now fix all the permissions. The mailing lists will again be functional on the new server.