Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

exim log rotation - keeping logs longer

Discussion in 'General Discussion' started by jamesbond, Jul 16, 2004.

  1. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    168
    How can I change the exim log rotation settings?

    Now it does weekly rotation and keeps logs for 4 weeks.
    I would like to keep the logs for longer than for weeks, I haven't been able to figure out how and where to change that.
     
  2. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    166
    read man logrotate

    then edit /etc/logrotate.d/exim accordingly

    So, if you want to keep logfiles for 6 weeks, you would add the line

    rotate 6

    prior to the compress command for each of the respective logs you wish to keep for a longer period of time.
     
  3. fizz

    fizz Well-Known Member

    Joined:
    Jan 25, 2002
    Messages:
    202
    Likes Received:
    0
    Trophy Points:
    316
    Just a friendly word of warning..

    If you receive a few thousand emails in a day, then this will ultimatly create a very large log file, and which will result in degraded system performance. I use MRTG to monitor system resources, and actually changed this to 1 day instead of 1 week, and performance increased 10fold!
     
  4. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    168
    Thanks for your help, but I think you misunderstood what I was trying to explain.

    I don't want to change the rotation frequency (weekly).
    All I want is to keep the archived logs for more than 4 weeks.
     
  5. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    166
    Then modify as suggested above by adding the

    rotate x (substitute the number of weeks you want to keep the logs for x)
     
  6. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    168
    Thanks bamasbest that seems to be the option I was searching for :)

    I assume the default value of rotate is 4 then and it is set to weekly by default also?
    I'm asking because I don't see it mentioned in the original /etc/logrotate.d/exim
     
    #6 jamesbond, Jul 16, 2004
    Last edited: Jul 16, 2004
  7. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    166
    the defaults for logrotation are located at /etc/logrotate.conf

    Yes, the default is weekly and 4 for RPM installs. Modifying any of the files in /etc/logrotate.d will override the defaults.
     
  8. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    168
    Excellent, thank you for your help.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice