/var/log/mail.log not being written to after logrotate

Discussion in 'Apple' started by Evan Platt, Oct 1, 2007.

  1. Evan Platt

    Evan Platt Guest

    Not sure if this is a logrotate issue, or a postfix issue..

    But right now I have /sw/etc/logrotate /etc/logrotate.conf set to run
    at midnight every night, but it appears it's only rotating weekly, and
    when it does, at least my /var/log/mail.log isn't being written to.
    Not sure what to look for but the mail.log permissions aren't 777, so
    I set them to 777 then do a postfix reload, still nothing is written
    to them.

    First off, am I correct that my first 'weekly' line in there is why
    the logs are only being rotated once a week? And second, any idea why
    when it does rotate, the mail.log is not being written to?

    A reboot fixes it, but I'd like to not have to reboot.

    Thanks.

    logrotate.conf:
    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

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

    # Mac OS X handles wtmp with periodic scripts.
    # 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.
    # Mac OS X handles other system logs with periodic scripts.
    /var/log/*.log {
    daily
    rotate 30
    compress
    create 777 root
    postrotate
    chmod 777 /var/log/*.log
    endscript
    sharedscripts
     
    Evan Platt, Oct 1, 2007
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.