Results 1 to 7 of 7

Thread: 5.0.4 What is the minimal values for e-mail/trashed/spam message lifetime?

  1. #1
    borispr is offline Active Member
    Join Date
    Sep 2007
    Posts
    36
    Rep Power
    7

    Default 5.0.4 What is the minimal values for e-mail/trashed/spam message lifetime?

    I have shared mail box. People just have access to inbox, so I would like to clean old messages and trash/spam automatically.

  2. #2
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    Default

    Email lifetime minimum is 30 days. The other two should have no minimum.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    borispr is offline Active Member
    Join Date
    Sep 2007
    Posts
    36
    Rep Power
    7

    Default

    I set 30 minutes for Spam messages and it doesn't work.
    Might I need to start some scripts?

  4. #4
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    Quote Originally Posted by borispr View Post
    I set 30 minutes for Spam messages and it doesn't work.
    Might I need to start some scripts?
    Besides being pretty low - it won't actually empty till the purge thread hits - check:
    zmprov gs server.domain.com | grep zimbraMailPurgeSleepInterval

    It's exposed in 5.0.3+ in the admin console: Bug 24823 - expose zimbraMailPurgeSleepInterval in Admin Console.

    1m is the new default in 5.0.3+, which can purge approx 1440 accounts per server per day. (The thread continues so if you have less than 1440 you accounts might be checked several times a day which is fine, though with fewer accounts some prefer a setting of 1h. (And we originally had it set to 1d by mistake which appeared to work fine on out dev boxes because with fewer accounts it was cleaning our accounts every few days.)

    zmpurgemessages, which used to produce some heavier load in 4.5.x because it purged everyone at one time, was removed from cron/libexec in Bug 20705 - Remove zmpurgemessages

    Work on this was done via Bug 13435 - User-definable expiration policy for systems folders where PurgeThread was implemented for 5.0.0RC2, which iterates all the mailboxes on the server and purges them one at a time. Mailboxes are only purged if they're loaded into the server cache & the thread sleeps between subsequent purges.
    In short, the current mailbox purge algorithm only affects mailboxes that are in memory - as the theory is that if a mailbox is not in memory, it's not being accessed, not receiving mail, and therefore has less of a need to be purged.

    To explain it better:
    The purge thread is constantly running, purging active mailboxes one at a time.Between every one-two mailboxes it sleeps for the interval specified by zimbraMailPurgeSleepInterval. This is way more robust than the old method & allows for spreading the load out overtime, which is especially nice for larger setups.

    zimbraMailLastPurgedMailboxId shows the last cleaned, but technically there'a a loophole with accounts that aren't being accessed/recieving mail because they're never pulled into memory so Bug 20720 - Guarantee that mailboxes will be purged was filed for the issue of wanting a double check - possibly by making use of a zimbraMailLastPurgedTimestamp on each account.

    Though that will be easier to implement later, because in 5.0.7 we make it possible to do more than 1440/day (settings less than 1m) by using DB for storage instead of LDAP: Bug 28842 – Mailbox purge interval settings are not scalable (zimbraMailLastPurgedMailboxId was too time consuming to write to LDAP, and also implemented purge_initial_sleep_ms set to 30m before doing work, to give the server time to warm up and take care of other tasks before starting cleanup.)

    Of course what mail is actually removed is all dependent on the following settings-

    Admins can set these attributes via CLI/Soap/Admin Console on COS or individual user:
    zimbraMailSpamLifetime (default is 30d)
    zimbraMailTrashLifetime (default is 30d)
    zimbraMailMessageLifetime (default is 0 disabled - careful with this one as it affects mail in any folder so 1d would erase all mail anywhere after 1 day)

    These as well, though currently not exposed in the user's UI (or admin console):
    zimbraPrefInboxReadLifetime (default is 0) - how long already read mail can remain in inbox before automatically removed
    zimbraPrefInboxUnreadLifetime (default 0) - how long unread mail can remain in inbox
    zimbraPrefSentLifetime (default 0)
    zimbraPrefJunkLifetime (default 0) -can't be set greater than zimbraMailSpamLifetime so that admins can force maximums)
    zimbraPrefTrashLifetime (default 0) - can't be set greater than zimbraMailTrashLifetime to enforce maximums)

  5. #5
    borispr is offline Active Member
    Join Date
    Sep 2007
    Posts
    36
    Rep Power
    7

    Default

    zmprov gs server.domain.com | grep zimbraMailPurgeSleepInterval
    returns
    zimbraMailPurgeSleepInterval: 0

    How to change it?
    mcf zimbraMailPurgeSleepInterval 1h
    Is it correct?
    Last edited by borispr; 06-20-2008 at 08:25 AM.

  6. #6
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    zmprov ms server.domain.com zimbraMailPurgeSleepInterval 1m

  7. #7
    borispr is offline Active Member
    Join Date
    Sep 2007
    Posts
    36
    Rep Power
    7

    Default

    Thank you! Now it works perfectly and I understand how it works

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Emails bouncing with "Error Text: 401,'null'"
    By sholden in forum Zimbra Connector for Outlook
    Replies: 27
    Last Post: 08-20-2008, 04:59 PM
  2. Junk/Trash + COS Message Lifetime problem
    By psousa in forum Administrators
    Replies: 2
    Last Post: 04-29-2008, 08:53 AM
  3. [SOLVED] Message Lifetime & Conversations...
    By natrixgli in forum Administrators
    Replies: 3
    Last Post: 09-08-2007, 06:15 PM
  4. E-mail message lifetime default
    By ryanenation in forum Administrators
    Replies: 1
    Last Post: 12-01-2006, 01:16 PM
  5. Trashed/Spam Message Lifetime
    By soxfan in forum Administrators
    Replies: 20
    Last Post: 10-25-2006, 08:14 AM

Posting Permissions

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