Saturday, July 26, 2014

exim 19922 File size limit exceeded/usr/sbin/exim -bd -q60m cpanel server

If you encounter any such error as below and your exim service is not working follow the steps below to resolve the issue.

=================
root@server [/usr/sbin]# /etc/rc.d/init.d/exim restart
Shutting down clamd:                                       [  OK  ]
Shutting down exim:                                        [FAILED]
Shutting down spamd:                                       [FAILED]
Starting clamd: /bin/bash: line 1:  1927 Terminated  /usr/local/cpanel/3rdparty/bin/clamd [FAILED]
Starting exim: /bin/bash: line 1:  1937 File size limit exceeded/usr/sbin/exim -bd -q60m [FAILED]                 0 processes (antirelayd) sent signal 9
Terminated
=================

The issue is that exim is down due to the size of log file of exim has reached the size of 2GB.

Run the command to check the size of log file, exim_mainlog is name of the log file.
  • ls -lh /var/log/exim_mainlog
Below is the test output, As you can see that the size is 2.0GB.

=============
root@server [~]# ls -lh /var/log/exim_mainlog
-rw-r----- 1 mailnull mail 2.0G Jul 25 23:29 /var/log/exim_mainlog
=============

 As you can see above due to the size of the log file exim is not able to start, To resolve this issue simply create a backup copy of log file and then create a new log file with the proper permission and ownership and then start the exim.
  • mv /var/log/exim_mainlog /var/log/exim_mainlog.BAK.$(date +%F)
Above command will create the copy of backup file with date like exim_mainlog.BAK.2014-07-26.
  • touch /var/log/exim_mainlog
  • chown mailnull.mail /var/log/exim_mainlog
  • chmod 0640 /var/log/exim_mainlog
  • service exim start or /etc/rc.d/init.d/exim restart

No comments:

Post a Comment

Do Write about the Blog and Welcome to the world where open source is every thing :-)