View Single Post
  #1  
Old 18th January 2008, 12:39
schmidse schmidse is offline
Junior Member
 
Join Date: Jun 2007
Location: Germany
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Unhappy Daily mail logrotation?!

Hello,

it seems that I've got a lack of understanding logrotate on your SLES 10 system. We want a daily logfile of /var/log/mail
IMO it is configured right --> look at the debug-Output of logrotate
Is there anybody out there who can see my misconfiguration?

logrotate -d /etc/logrotate.d/syslog
Code:
reading config file /etc/logrotate.d/syslog
reading config info for /var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall
reading config info for /var/log/mail /var/log/mail.info /var/log/mail.warn /var/log/mail.err
reading config info for /var/log/news/news.crit /var/log/news/news.err /var/log/news/news.notice

Handling 3 logs

rotating pattern: /var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall  4194304 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/warn
  log does not need rotating
considering log /var/log/messages
  log does not need rotating
considering log /var/log/allmessages
  log /var/log/allmessages does not exist -- skipping
considering log /var/log/localmessages
  log does not need rotating
considering log /var/log/firewall
  log /var/log/firewall does not exist -- skipping
not running postrotate script, since no logs were rotated

rotating pattern: /var/log/mail /var/log/mail.info /var/log/mail.warn /var/log/mail.err  after 1 days (7 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/mail
  log needs rotating
considering log /var/log/mail.info
  log needs rotating
considering log /var/log/mail.warn
  log needs rotating
considering log /var/log/mail.err
  log needs rotating
rotating log /var/log/mail, log->rotateCount is 7
glob finding old rotated logs failed
rotating log /var/log/mail.info, log->rotateCount is 7
glob finding old rotated logs failed
rotating log /var/log/mail.warn, log->rotateCount is 7
glob finding old rotated logs failed
rotating log /var/log/mail.err, log->rotateCount is 7
glob finding old rotated logs failed
renaming /var/log/mail to /var/log/mail-20080118
creating new log mode = 0640 uid = 0 gid = 0
renaming /var/log/mail.info to /var/log/mail.info-20080118
creating new log mode = 0640 uid = 0 gid = 0
renaming /var/log/mail.warn to /var/log/mail.warn-20080118
creating new log mode = 0640 uid = 0 gid = 0
renaming /var/log/mail.err to /var/log/mail.err-20080118
creating new log mode = 0640 uid = 0 gid = 0
running postrotate script
running script with arg /var/log/mail /var/log/mail.info /var/log/mail.warn /var/log/mail.err : "
        /etc/init.d/syslog reload
"
compressing log with: /bin/gzip
compressing log with: /bin/gzip
compressing log with: /bin/gzip
compressing log with: /bin/gzip
/etc/logrotate.conf
Code:
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# uncomment these to switch compression to bzip2
compresscmd /usr/bin/bzip2
uncompresscmd /usr/bin/bunzip2

# former versions had to have the compresscommand set accordingly
#compressext .bz2

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
#/var/log/wtmp {
#    monthly
#    create 0664 root utmp
#    rotate 1
#}

# system-specific logs may be also be configured here.
/etc/logrotate.d/syslog
Code:
/var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall {
    compress
    dateext
    maxage 365
    rotate 99
    missingok
    notifempty
    size +4096k
    create 640 root root
    sharedscripts
    postrotate
        /etc/init.d/syslog reload
    endscript
}

/var/log/mail /var/log/mail.info /var/log/mail.warn /var/log/mail.err {
    compress
    dateext
    daily
    maxage 30
    rotate 7
    nomissingok
    ifempty
    create 640 root root
    sharedscripts
    postrotate
        /etc/init.d/syslog reload
    endscript
}

/var/log/news/news.crit /var/log/news/news.err /var/log/news/news.notice {
    compress
    dateext
    maxage 365
    rotate 99
    missingok
    notifempty
    size +4096k
    create 640 news news
    sharedscripts
    postrotate
        /etc/init.d/syslog reload
    endscript
}
I've already taken the part starting with /var/log/mail* out of the /etc/logrotate.d/syslog into /etc/logrotate.conf
But this doesn't help me. The logfiles with a dateextension haven't been created.

Thanks in advance, if somebody could help us.

Best regards
Reply With Quote
Sponsored Links