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-10-2009, 03:13 AM
Active Member
 
Posts: 29
Default [SOLVED] Limit search mails zmmailbox

Hi all.

We have to delete all mail before 11/8/2009 from a mailbox.

I see i can't delete more than 1000 mails at one time.

emails=`zmmailbox -z -m user@mail.com s -l 100000 -t message "in:inbox before: 11/8/2009"|awk '{ if (NR!=1) {print}}'| grep mess | awk '{ print $2 "," }' | tr -d '\n'`

and then :

zmmailbox -z -m user@mail.com dm `echo $emails`

but it only deletes the first 1000 mails.

Is there a limit for searching emails ?

BR

EDIT: version 5.011 NE ubuntu 32

Last edited by okahei; 11-10-2009 at 03:21 AM..
Reply With Quote
  #2 (permalink)  
Old 11-10-2009, 03:40 AM
Zimbra Consultant & Moderator
 
Posts: 20,312
Default

Quote:
Originally Posted by okahei View Post
Is there a limit for searching emails ?
There's no limit on searching for email.

Don't forget the forum search function: [SOLVED] delete mails via cli based on date
__________________
Regards


Bill
Reply With Quote
  #3 (permalink)  
Old 11-10-2009, 07:27 AM
Outstanding Member
 
Posts: 708
Default

Quote:
There's no limit on searching for email.
Is too. zmmailbox has a hard-coded limit of 1000, even when specifying a higher limit like -l 10000.

To work around, just wrap it in a for or while loop.

Alternative strategy: search for messages after the cutoff, mm to a temp folder, ef /inbox, and mm back to inbox.
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.