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 02-09-2010, 07:13 AM
Junior Member
 
Posts: 6
Default [SOLVED] zmmailbox to export emails by date

I'm trying to export emails from a mailbox by date, but keep getting the below error. It appears that the ":" character in the query variable is causing the issue. Any idea how to properly format the date for this query?

[zimbra@mail ~]$ query='before:"1/27/2010" after:"5/29/2009"'
[zimbra@mail ~]$ zmmailbox -z -m test@testtest.com gru "//?fmt=tgz&query=$query" > /tmp/test.tgz

ERROR: zclient.CLIENT_ERROR (unable to parse URI:
https://mail.testtest.com:7071/service/admin/soap/) (cause:
java.net.URISyntaxException Illegal character in query at index 87:
https://mail.testtest.com:443/home/test@testtest.com/?fmt=zip&query=before:"1/27/2010"
after:"5/29/2009")

Without the date range parameters, the export works without an error.

Regards,
~john

Last edited by John Kim; 02-09-2010 at 01:56 PM..
Reply With Quote
  #2 (permalink)  
Old 02-09-2010, 11:37 PM
Moderator
 
Posts: 7,928
Default

Code:
query='before:1/27/2010 after:5/29/2009'
works okay.
__________________
Reply With Quote
  #3 (permalink)  
Old 02-10-2010, 06:13 AM
Junior Member
 
Posts: 6
Default

Thanks for the reply. It appears that the below does work on version 6, but not for my version (5.016).

Quote:
Originally Posted by uxbod View Post
Code:
query='before:1/27/2010 after:5/29/2009'
works okay.
I had to replace the space with the" %20" and now it works.

Code:
query='before:1/27/2010%20after:5/29/2009'
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.