Results 1 to 9 of 9

Thread: [SOLVED] Extend the rotation of mailbox.log

  1. #1
    Hatrix is offline Translation Moderator
    Join Date
    Aug 2009
    Location
    Palma de Mallorca, Spain
    Posts
    66
    Rep Power
    6

    Default [SOLVED] Extend the rotation of mailbox.log

    Hello Forum,

    I need to change somehow the way log4j does the rotation on at least the mailbox.log file, currently i have some 10 days but I need to have at least 30 days, if possible we want to have 90 days.

    How do I change this? I tried to search in the forums and to google but did not really found helpful information on this regard,

    thanks

  2. #2
    Hatrix is offline Translation Moderator
    Join Date
    Aug 2009
    Location
    Palma de Mallorca, Spain
    Posts
    66
    Rep Power
    6

    Default additional info

    I tried to put this in the conf/log4j.properties file:
    log4j.appender.LOGFILE.MaxBackupIndex=30

    but then I get this message:

    zimbra@mailserver:~/conf$ zmprov -v
    log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.


    ....



    best regards
    Ray

  3. #3
    Hatrix is offline Translation Moderator
    Join Date
    Aug 2009
    Location
    Palma de Mallorca, Spain
    Posts
    66
    Rep Power
    6

    Default ok, i'l got a little further

    After reading the online documentation to log4j it seems like there is nothing which deletes old logfiles in log4j on rotation, so i dug a little further and i come across the crontab of the zimbra user,

    there I found:

    # ZIMBRASTART -- DO NOT EDIT ANYTHING BETWEEN THIS LINE AND ZIMBRAEND
    #
    # Log pruning
    #
    30 2 * * * find /opt/zimbra/log/ -type f -name \*.log\* -mtime +8 -exec rm {} \; > /dev/null 2>&1
    35 2 * * * find /opt/zimbra/log/ -type f -name \*.out.???????????? -mtime +8 -exec rm {} \; > /dev/null 2>&1


    So, there it is where my logfiles get deleted, but how to proceed from there? I should not edit anything here, is this autogenerated? is the value +8 editable somewhere? In the LDAP?

    If not, do I have to take care to check on every upgrade ???

    thanks for any help,

    best
    Ray

  4. #4
    Hatrix is offline Translation Moderator
    Join Date
    Aug 2009
    Location
    Palma de Mallorca, Spain
    Posts
    66
    Rep Power
    6

    Default for the time being

    Ok, for the time being I changed the crontab to the following:

    # ZIMBRASTART -- DO NOT EDIT ANYTHING BETWEEN THIS LINE AND ZIMBRAEND
    #
    # Log pruning
    #
    30 2 * * * find /opt/zimbra/log/ -type f -name \*.log\* -and ! -name mailbox.log\* -mtime +8 -exec rm {} \; > /dev/null 2>&1
    30 2 * * * find /opt/zimbra/log/ -type f -name mailbox.log\* -mtime +30 -exec rm {} \; > /dev/null 2>&1


    means that all logfiles get rotated on their 8 day scheme, but mailbox.log will stay for 30 days ...

    I do hope someone can tell me how to do this the proper way thought ...

    best
    Ray

  5. #5
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,585
    Rep Power
    57

    Default

    [SOLVED] Increase number of logs to keep .... and yes, you will need to change that on every upgrade.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  6. #6
    Hatrix is offline Translation Moderator
    Join Date
    Aug 2009
    Location
    Palma de Mallorca, Spain
    Posts
    66
    Rep Power
    6

    Default Did not find that

    Hi,

    interesting, i was searching within the last 2 weeks quite a bit in the forum but did not find this message ...

    Would have helped me out in the first place ...

    best
    Ray

  7. #7
    Hatrix is offline Translation Moderator
    Join Date
    Aug 2009
    Location
    Palma de Mallorca, Spain
    Posts
    66
    Rep Power
    6

    Default resolved

    I'l set this to resolved for now, though wishing someone finds out a better method ...

    best
    Ray

  8. #8
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,585
    Rep Power
    57

    Default

    Quote Originally Posted by Hatrix View Post
    I'l set this to resolved for now, though wishing someone finds out a better method ...
    If you would like some option to change the retained period of the log files then I'd suggest you file an RFE in Bugzilla Main Page - Zimbra, that would be the appropriate place for it.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  9. #9
    Hatrix is offline Translation Moderator
    Join Date
    Aug 2009
    Location
    Palma de Mallorca, Spain
    Posts
    66
    Rep Power
    6

    Default RFE for more days worth of logs

    Hi,

    i took your advice at heart and created a bug/feature request:

    Bug 44554 – log4j configurable amount of days to keep logs.

    maybe some of the people concerned with this bug should care to vote.

    best regards
    Ray

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 07-22-2011, 05:12 AM
  2. Admin PowerTip: Mailbox.log
    By jholder in forum Administrators
    Replies: 1
    Last Post: 10-21-2009, 10:45 AM
  3. Zimbra generates large mailbox.log files
    By Peperzaken in forum Administrators
    Replies: 14
    Last Post: 12-03-2008, 11:11 AM
  4. How to extend login page ?
    By yattamax in forum Administrators
    Replies: 0
    Last Post: 11-14-2007, 02:44 AM
  5. Extend Application Architecture ?
    By kbaker in forum Developers
    Replies: 2
    Last Post: 02-01-2006, 04:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •