Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
 
Go Back   Zimbra - Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra - Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-17-2008, 06:00 AM
Loyal Member
 
Posts: 79
Default [SOLVED] Timeout Policy: Spam message lifetime doesn't work

Hi,

I just upgraded from 4.5 to 5.0.2 on Ubuntu and it seems that Spam no longer automatically gets deleted from my Junk folder after the amount of days set in the Spam message lifetime, where it did in 4.5. I looked around in the forums and there is some talk on this COS setting vs user settings, but that did not help me.

Any ideas?

regards Bart.
Reply With Quote
  #2 (permalink)  
Old 02-18-2008, 12:35 AM
Zimbra Consultant
 
Posts: 5,784
Default

In addition to zimbraMailSpamLifetime, there's a new value you probably need to set:
zmprov ms server.domain.com zimbraMailPurgeSleepInterval 1d
Update: Or lower like 1h or 1m (which we will make the new default)
__________________
-Mike Morse (MCode151)

ZCS-to-ZCS Migrations & Moves | Admin Tools & Tidbits » ZimbraBlog.com | ZimbraCommunity.com

Last edited by mmorse : 03-21-2008 at 08:44 AM.
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 01:50 AM
Loyal Member
 
Posts: 79
Default

I executed:

zmprov ms server.domain.com zimbraMailPurgeSleepInterval 1d

and it immediately purged my spam that was older than 30 days, which is good.
Then I waited one day to see if it would do this automatically from now on, but it doesn't.

I ran it as user zimbra. Was that correct? Or should it have been root?
Or should I make a cron job of this?

regards Bart.
Reply With Quote
  #4 (permalink)  
Old 02-25-2008, 08:49 AM
Partner (VAR/HSP)
 
Posts: 145
Default

Hi mmorse,

for me this did not help....
For testing I have one account with
zimbraMailSpamLifetime: 1d
And I have set zimbraMailPurgeSleepInterval to 1d.

In my mailbox.log I see:

Code:
mailbox.log.2008-02-22:2008-02-22 13:18:02,374 INFO  [btpool0-291] [name=zimbra;ip=127.0.0.1;] mailbox - Starting purge thread with sleep interval 86400000ms
But my testaccount is never being purged...
Could I trigger the Junkfolder purging?

Regards
Thomas

Last edited by mmorse : 02-26-2008 at 10:58 AM. Reason: oops not mine
Reply With Quote
  #5 (permalink)  
Old 02-25-2008, 08:54 AM
Intermediate Member
 
Posts: 23
Default I am also seeing spam accumulate

Despite the COS setting of 30d, I am seeing older spam accumulate in the junk folders. Unlike the OP, I did not see any immediate difference after running the following: zmprov ms mail.domain.com mbraMailPurgeSleepInterval 1d. This started after I upgraded from 4.5.10 to 5.0.2. Is there a work-around?

When I look at crontab for zimbra user I do not see an entry for zmpurgemessages. Should there be one?

I did not see a bug report on this. I searched on spam lifetime and spam timeout. Do we need a bug report filed on this?
Reply With Quote
  #6 (permalink)  
Old 02-25-2008, 09:05 AM
Partner (VAR/HSP)
 
Posts: 145
Default

Quote:
Originally Posted by rfoster View Post
Despite the COS setting of 30d, I am seeing older spam accumulate in the junk folders. Unlike the OP, I did not see any immediate difference after running the following: zmprov ms mail.domain.com mbraMailPurgeSleepInterval 1d. This started after I upgraded from 4.5.10 to 5.0.2. Is there a work-around?
Same for me.... no immediate difference after setting zimbraMailPurgeSleepInterval to 1d.

Quote:
Originally Posted by rfoster View Post
I did not see a bug report on this. I searched on spam lifetime and spam timeout. Do we need a bug report filed on this?
Yes. I think we should....

BTW: zmpurgemessages does not exist any longer...

Regards
Thomas
Reply With Quote
  #7 (permalink)  
Old 02-25-2008, 09:26 AM
Intermediate Member
 
Posts: 23
Default

Thomas,

Thanks for the heads-up about zmpurgemessages.

Bug 25018 has been added to the database.

Bob
Reply With Quote
  #8 (permalink)  
Old 02-25-2008, 09:59 AM
Zimbra Consultant
 
Posts: 5,784
Default

All: Could you set zimbraMailPurgeSleepInterval to 1h or 1m please? (1m will be the new default)

To explain it better: There really is no concept of a "purge interval". The purge thread is constantly running, purging mailboxes in memory, one at a time. Between every one-two mailboxes it sleeps for the interval specified by zimbraMailPurgeSleepInterval. I have much fewer mailboxes on my server so 1d is fine for me - set accordingly after you work out the math This is way more robust than the old method & allows for spreading the load out overtime, which is especially nice for larger setups.

Work on this was done via Bug 13435 - User-definable expiration policy for systems folders where PurgeThread was implemented, 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.
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.

And yes zmpurgemessages, which used to produce some heavier load, was removed from cron/libexec in Bug 20705 - Remove zmpurgemessages

Rob: Matt & I have marked Bug 25018 - Spam not being purged from junk folders a dupe for now, as your description when you opened it didn't give mention that you had already tried setting the interval:
Quote:
Originally Posted by rob in bug 25018
With a COS setting of Spam Lifetime = 30d in the Admin web interface, I am seeing older spam accumulate in the junk folders. This started after an upgrade
from 4.5.10 to 5.0.2.
Of course then I saw your forum post - should this not work we'll reopen/redirect.

If you're curious the attribute properties read:
Quote:
<attr id="542" name="zimbraMailPurgeSleepInterval" type="duration" cardinality="single" optionalIn="globalConfig,server" flags="serverInherited,domainAdminModifiable" callback="MailboxPurge">
<globalConfigValue>0</globalConfigValue>
<desc>Sleep time between subsequent mailbox purges. 0 means that mailbox purging is disabled.</desc>
</attr>
I generally set it at the server level, do note that if at any point you set server, it won't inherit from global anymore till it's reset "" - server overrides global - so for instance:
zmprov ms server.domain.com zimbraMailPurgeSleepInterval 1h
overrides:
zmprov mcf zimbraMailPurgeSleepInterval 1m

You can check your values by:
zmprov gacf | grep zimbraMailPurgeSleepInterval
zmprov gs server.domain.com | grep zimbraMailPurgeSleepInterval

To find out who last got cleaned up simply run:
zmprov gs server.domain.com | grep zimbraMailLastPurgedMailboxId

5.0.3 should have: Bug 24823 - expose zimbraMailPurgeSleepInterval in Admin Console. & solve this for others via Bug 23842 - Purging off by default in 5.0 (need upgrade step) -default will be 1m.
__________________
-Mike Morse (MCode151)

ZCS-to-ZCS Migrations & Moves | Admin Tools & Tidbits » ZimbraBlog.com | ZimbraCommunity.com

Last edited by mmorse : 02-26-2008 at 11:26 AM.
Reply With Quote
  #9 (permalink)  
Old 02-25-2008, 10:58 AM
Intermediate Member
 
Posts: 23
Default

Mike,

Thanks for the detailed explanation.

I looked at my mailbox.log and saw that when I earlier set zimbraMailPurgeSleepInterval to 1d it ran the purge on one account (not two) succesfully.

When I set zimbraMailPurgeSleepInterval to 1m nothing happens. When I run zmprov gacf I get zimbraMailPurgeSleepInterval: 0.

Bob
Reply With Quote
  #10 (permalink)  
Old 02-25-2008, 11:01 AM
Partner (VAR/HSP)
 
Posts: 145
Default

Quote:
Originally Posted by mmorse View Post
All:
Could you set zimbraMailPurgeSleepInterval to 1h or 1m & see if that has any effect?
Hi mmorse,

thanks alot... This changed something for me. BUT:
I had to set the zimbraMailPurgeSleepInterval to 0 first. After doing so, I had this message in mailbox.log:

Code:
2008-02-25 18:53:13,534 INFO  [MailboxPurge] [name=name@some.dom.ain;mid=6;] mailbox - Purge thread was interrupted.  Shutting down.
After that I set the zimbraMailPurgeSleepInterval to 1m:

Code:
2008-02-25 18:53:49,342 INFO  [btpool0-419] [name=zimbra;ip=127.0.0.1;] mailbox - Starting purge thread with sleep interval 60000ms
2008-02-25 18:53:49,355 INFO  [MailboxPurge] [name=name@domain;mid=7;] mailbox - Purging messages.
2008-02-25 18:54:51,252 INFO  [MailboxPurge] [name=name2@domain;mid=9;] mailbox - Purging messages.
2008-02-25 18:55:51,288 INFO  [MailboxPurge] [name=name3@domain;mid=12;] mailbox - Purging messages.
2008-02-25 18:56:51,328 INFO  [MailboxPurge] [name=name4@domain;mid=17;] mailbox - Purging messages.
2008-02-25 18:57:51,685 INFO  [MailboxPurge] [name=name5@domain;mid=18;] mailbox - Purging messages.
2008-02-25 18:58:52,213 INFO  [MailboxPurge] [name=name6@domain;mid=20;] mailbox - Purging messages.
So it seems, mailboxes are being purge one by one with a Interval of 1m...

Thanks and regards
Thomas
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0