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 Search this Thread Display Modes
  #1 (permalink)  
Old 11-15-2007, 06:45 AM
Junior Member
 
Posts: 7
Thumbs down [SOLVED] junk mail cleanup

Totally new to zimbra and impressed !
2 questions:
- how to cleanup the junkmail folders periodically ? Can an expire date be set ?
- Is there an option where I can give an administrator email who must be notified when the queue increases exponentiallly ...

Looking forward for more zimlets :-)

Regards,


Johan (Belgium)
Reply With Quote
  #2 (permalink)  
Old 11-15-2007, 09:06 AM
Moderator
 
Posts: 6,236
Default

Welcome to the forums,
Quote:
Originally Posted by jonix View Post
Totally new to zimbra and impressed !
With the thread logo I gather you meant 'it wins hands down' or did you mean that a thumbs up? -lol
Quote:
Originally Posted by jonix View Post
- how to cleanup the junkmail folders periodically ? Can an expire date be set ?
In the admin console gui > individual user (or COS) > advanced tab > scroll to the bottom > and you can set:
Spam message lifetime -Number of days a message can remain in the Junk folder before it is automatically purged. The default is 30 days.
Trashed message lifetime - Number of days a message remains in the Trash folder before it is automatically purged. The default is 30 days.

There's also this but I doubt you're looking to set it, do be careful or you'll wipe everyone's email by setting it to 1 day etc:
Email message lifetime - Number of days a message can remain in any folder before it is automatically purged. The default is 0; email messages are not deleted.

(All of these can also be set via CLI.)

If you checkout v5 in the hosted demo or install your own RC1 (though I wouldn't use any IMAP with RC1 as there's currently a tiny bug in the betas) an end-user can go to preferences and set their own lifetimes (based on admin minimum allowances of course)

Quote:
Originally Posted by jonix View Post
- Is there an option where I can give an administrator email who must be notified when the queue increases exponentiallly ...
In case stuff is starting to get stuck there an RFE for: Bug 11092 - queue alert
(That's for a pop in the admin-console; didn't want to add another email to the mix, though you could certainly note that an admin email woudl be acceptable too.)

But you can also file an new RFE in bugzilla for 'heavy use threshold warnings' (both of queue and all message traffic) if you'd like.
However do realize that you can use SNMP to monitor a few things. And there's even an HypericHQ plugin. (could rattle off company names all day)
Quote:
Originally Posted by jonix View Post
Looking forward for more zimlets :-)
Start developing or tell us what you'd like to see!

Last edited by mmorse; 11-15-2007 at 09:10 AM..
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 06:41 AM
Junior Member
 
Posts: 7
Default thnx for your reply

we have several zimbra's running now:-)
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 03:38 PM
Active Member
 
Posts: 32
Cool

Quote:
Originally Posted by mmorse View Post
In the admin console gui > individual user (or COS) > advanced tab > scroll to the bottom > and you can set:
Spam message lifetime -Number of days a message can remain in the Junk folder before it is automatically purged. The default is 30 days.
Trashed message lifetime - Number of days a message remains in the Trash folder before it is automatically purged. The default is 30 days.
I have those set yet there's still messages in my Trash folder dating back to January. Is there a separate cron job that needs to be run or something? When and how does that value get checked to do a purge?

Jay
Reply With Quote
  #5 (permalink)  
Old 04-10-2008, 04:11 PM
Moderator
 
Posts: 6,236
Default

What's your ZCS version? http://www.zimbra.com/forums/announc...html#post62754

If it's 5.0.x:
zmprov gs server.domain.com | grep zimbraMailPurgeSleepInterval
Reply With Quote
  #6 (permalink)  
Old 04-10-2008, 07:31 PM
Active Member
 
Posts: 32
Default

Release 5.0.2_GA_1975.DEBIAN4.0 DEBIAN4.0 FOSS edition

> zmprov gs tantalus.thinktek.ca | grep zimbraMailPurgeSleepInterval
zimbraMailPurgeSleepInterval: 0
>

Your post set me on the trail to this command:

> zmprov ModifyServer tantalus.thinktek.ca zimbraMailPurgeSleepInterval 1h
> zmprov gs tantalus.thinktek.ca | grep zimbraMailPurgeSleepInterval
zimbraMailPurgeSleepInterval: 1h

so I suspect things are much better now. I'll find out soon then set it to 1d once I'm confident it's working.

Thanks!
Reply With Quote
  #7 (permalink)  
Old 04-10-2008, 08:14 PM
Moderator
 
Posts: 6,236
Default

Actually unless you're the only account, I would set it to something lower like 1m (or stick with 1h) - if you set it to 1d then it'd only purge 2 or so accounts per day.

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

Of course it's all dependent on the zimbraMailSpamLifetime/zimbraMailTrashLifetime (default 30d) for what mail is removed.
Reply With Quote
  #8 (permalink)  
Old 04-11-2008, 02:35 AM
Active Member
 
Posts: 31
Default

Mmm
I don't really understand I think

I've setup the following:
'Spam message lifetime: 1day'

And this is the output on the console:

[zimbra@$$$$ ~]$ zmprov gs eigenwijze-1.linux.iu.nl | grep zimbraMailPurgeSleepInterval
zimbraMailPurgeSleepInterval: 0

How can I change it to the right ?

Last edited by Priyantha Bleeker; 04-17-2008 at 02:59 AM..
Reply With Quote
  #9 (permalink)  
Old 04-11-2008, 08:33 AM
Active Member
 
Posts: 32
Default

Do the purges get audited in the logs anywhere?
Reply With Quote
  #10 (permalink)  
Old 04-11-2008, 11:04 AM
Moderator
 
Posts: 6,236
Default

Quote:
Originally Posted by Cheakamus View Post
Do the purges get audited in the logs anywhere?
Yes, /opt/zimbra/log/mailbox.log:
2008-04-11 12:01:51,252 INFO [MailboxPurge] [name=name@domain;mid=#;] mailbox - Purging messages.

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.