Logrotate not working with custom exim logs

paul-w

Verified User
Joined
Jan 25, 2006
Messages
51
Location
Berkshire, UK
I use MailScanner + exim which involves separate exim processes for inbound and outbound.

Having an issue with rotating the exim logs for the inbound process which is the additional one I use. Here's what /etc/logrotate.d/exim has. The various log files in /var/log/exim are rotated correctly but the ones in /var/spool/exim/msglog aren't.

I made a change today because I noticed I had /var/spool/exim/paniclog and /var/spool/exim/rejectlog instead of /var/spool/exim/msglog/paniclog and /var/spool/exim/msglog/rejectlog so I corrected this. However, since /var/spool/exim/msglog/mainlog is the very large file that isn't being rotated, I can't see that this correction will make any difference.

Here's my /etc/logrotate.d/exim file:

Code:
# cat /etc/logrotate.d/exim
/var/spool/exim/msglog/mainlog /var/spool/exim/msglog/paniclog /var/spool/exim/msglog/rejectlog /var/log/exim/mainlog /var/log/exim/processlog /var/log/exim/rejectlog /var/log/exim/paniclog {
sharedscripts
}

In /etc/logrotate.conf I have no reference to exim, instead there's this reference:
Code:
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

Permissions on /var/spool/exim/msglog/mainlog are identical to /var/log/exim/mainlog
 
Hello,

Run it in debug mode
Code:
logrotate -d /etc/logrotate.conf 2>&1 | less

and see what is wrong
 
Thanks. Doesn't need anything doing though (rotates weekly):

rotating pattern: /var/spool/exim/msglog/mainlog /var/spool/exim/msglog/paniclog
/var/spool/exim/msglog/rejectlog /var/log/exim/mainlog /var/log/exim/processlog
/var/log/exim/rejectlog /var/log/exim/paniclog weekly (4 rotations)

empty log files are rotated, old logs are removed
considering log /var/spool/exim/msglog/mainlog
log does not need rotating
considering log /var/spool/exim/msglog/paniclog
log does not need rotating
considering log /var/spool/exim/msglog/rejectlog
log does not need rotating
considering log /var/log/exim/mainlog
log does not need rotating
considering log /var/log/exim/processlog
log does not need rotating
considering log /var/log/exim/rejectlog
log does not need rotating
considering log /var/log/exim/paniclog
log does not need rotating
 
Back
Top