1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice

maillog rotate

Discussion in 'Plesk for Linux - 8.x and Older' started by jeykalu, Sep 1, 2005.

  1. jeykalu

    jeykalu Guest

    0
     
    I try to rotate the /usr/local/psa/var/log/maillog file. The problem is that it rotates but after the maillog doesn't work. Here my logrotate.conf code, I think I have to add something in postrotate... What do you think ?

    /usr/local/psa/var/log/maillog {
    size=1024k
    rotate 10
    compress
    missingok
    }

    Thanks.
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
    Have you tried putting the 'copytruncate' option? That way the original maillog file stays in place, but upon successful copy to the backup file, the original is then modified truncated 'in place', so no worries about ownership/perms/starting and stopping the service...

    For example, Plesk does this to rotate all the logs in /usr/local/psa/admin/logs :

    /usr/local/psa/admin/logs/*_log {
    weekly
    rotate 12
    missingok
    notifempty
    copytruncate
    compress
     
  3. jeykalu

    jeykalu Guest

    0
     
    I had the same response on another forum. It is the good solution. Now it works. Thank you.
     
Loading...