Exim mainlog file problem... Over 1GB...

evolver

Verified User
Joined
Mar 11, 2006
Messages
44
Hello all,

in my server I was check my exim mainlog and I see this ;

-rw-r--r-- 1 mail mail 1.2G Nov 15 00:22 mainlog

The mainlog file is over 1GB ....

How can I clean it manually or can I delete the log file for fresh file ?

Thanks...
 
It should rotate logs on a normal basis for you. Make sure that syslogd is running.

Try:

/sbin/service syslog restart
 
Take a directory of the file so you know it's permissions and ownership.

Then delete it.

Then recreate it:

# touch mainlog

then change the permissions and ownership as necessary with chmod and chown.

I'm not sure if mainlog is managed by syslogd or by exim. So to be safe restart both:

# service syslogd restart
# service exim restart

(The above two commands work for CentOS and RHEL. For other OS distributions, restart the two daemons as specified for your distribution.)

Jeff
 
Thank you for helping..

But now other problem is big...I can't start or stop exim or other services...

I got this error ;

root@gateway ~]# service exim restart
Shutting down exim: /etc/init.d/exim: line 40: kill: (3107) - No such process

rm: cannot remove `/var/lock/subsys/exim': Read-only file system
Starting exim:
touch: cannot touch `/var/lock/subsys/exim': Read-only file system


:( :(
Where is the problem ...Please help me...thanks...
 
Back
Top