Results 1 to 3 of 3

Thread: [SOLVED] Limit search mails zmmailbox

  1. #1
    okahei is offline Active Member
    Join Date
    Nov 2008
    Rep Power

    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 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 dm `echo $emails`

    but it only deletes the first 1000 mails.

    Is there a limit for searching emails ?


    EDIT: version 5.011 NE ubuntu 32
    Last edited by okahei; 11-10-2009 at 04:21 AM.

  2. #2
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Vannes, France
    Rep Power


    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


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Rep Power


    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.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mail deferred with Connection timed out
    By Miklos Kalman in forum Administrators
    Replies: 7
    Last Post: 11-17-2012, 06:11 AM
  2. Why is Zimbra so buggy?
    By edwin.arneson in forum Users
    Replies: 50
    Last Post: 11-14-2011, 09:38 AM
  3. zmmailbox search limit ?
    By sysinternals in forum Administrators
    Replies: 3
    Last Post: 09-09-2009, 12:33 PM
  4. search vs. searchConv
    By DarthJader in forum Developers
    Replies: 0
    Last Post: 05-30-2008, 02:26 PM
  5. Limit user to interal mails?
    By chh in forum Administrators
    Replies: 0
    Last Post: 11-27-2006, 06:26 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