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

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 09-08-2006, 10:47 PM
Partner (VAR/HSP)
 
Posts: 197
Question Help: Need a REST URL to return all emails (all folders) matching search criteria

Hi Zimbra Community

I'd like to issue a REST URL to query a users mail store and return a ZIP or RSS feed to all emails matching a query.

There is some information in the Wiki.
http://wiki.zimbra.com/index.php?title=User_Migration
And SVN
http://svn.sourceforge.net/viewvc/zi...=1&view=markup

For example:
Code:
http://[hostname]/zimbra/home/[/url][zimbra-username]/?fmt=zip&query=(from:(@zimbra.com))
Should return a ZIP containing all emails from zimbra.com. But it doesn't work.

This example DOES work, but only searches the Inbox folder.
Code:
http://[hostname]/zimbra/home/[/url][zimbra-username]/inbox.zip?query=(from:(@zimbra.com))
Can anyone help out?
Reply With Quote
  #2 (permalink)  
Old 09-09-2006, 07:47 AM
Zimbra Employee
 
Posts: 4,792
Default

REST currently requires a folder to root the search. Please file a bug for this enhancement. Also vote on it as this is one way we prioritize which features to work on next.
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
  #3 (permalink)  
Old 09-09-2006, 11:40 AM
Zimbra Employee
 
Posts: 228
Default

I'm pretty sure that used to work. I know I used to do things like an RSS feed for all unread items in a mailbox, across folders. I have a feeling that functionality was accidently removed during recent changes for public sharing and document support.

Please file a bug on it, and hopefully we can get it fixed in a patch release.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #4 (permalink)  
Old 10-25-2006, 08:34 AM
Junior Member
 
Posts: 7
Default

Quote:
I'd like to issue a REST URL to query a users mail store and return a ZIP or RSS feed to all emails matching a query.
I'd like to do a similar thing : a search based on the ID.
For example, if I want to backup the e-mail with the following ID 4144, 4145 and 4168, (*) which is the correct REST URL to write ?

For a singolar e-mail I've tried with
(THIS WORK, I KNOW)
Code:
http://server/zimbra/user/uname/inbox?id=4144&fmt=zip
but
Code:
http://server/zimbra/user/uname/inbox?fmt=zip&query=(id:4144)
or
Code:
http://server/zimbra/user/uname/?fmt=zip&query=(id:4144)
DON'T WORK even because I don't know which are the keywords (more then IS and FROM) by which build a query.

However (*) is my main issue.
10x to all for any support.

Last edited by AranBenjO; 10-25-2006 at 08:37 AM..
Reply With Quote
  #5 (permalink)  
Old 10-25-2006, 02:39 PM
Zimbra Employee
 
Posts: 1,434
Default

Quote:
Originally Posted by AranBenjO
I'd like to do a similar thing : a search based on the ID.
For example, if I want to backup the e-mail with the following ID 4144, 4145 and 4168, (*) which is the correct REST URL to write ?
Have you tried something like this?
Code:
http://server/zimbra/user/uname/inbox?fmt=zip&query=(item:{4144,4145,4168})
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #6 (permalink)  
Old 10-26-2006, 05:41 AM
Junior Member
 
Posts: 7
Default

Quote:
Have you tried something like this?
Quote:
http://server/zimbra/user/uname/inbox?fmt=zip&query=(item:{4144,4145,4168})
Yes, but it doesn't work
Reply With Quote
  #7 (permalink)  
Old 10-30-2006, 05:56 AM
Junior Member
 
Posts: 7
Default

Hi ! I've found a useful documentation on query structure here

I've another little question : with this query

http://server/zimbra/user/uname/?fmt=zip&query=(tag:tagname)

I would collect in a zip file all messages tagged with "tagname" present in ALL directories, or ALL directories except TRASH o SPAM, but I get in return all messages in INBOX tagged with "tagname" without searching recursively in INBOX.

If I have a directory structure like this (dirs with capital letter)

INBOX
...|--->Message tagged0
...|--->Message tagged0.1
...|--> TEST1
.............|--->Message tagged1
...|--->TEST2
.............|--->Message tagged2
.............|--->TEST2.1
.......................|--->Message tagged2.1
...|--->TEST3

The query will return only Message tagged{0, 0.1} without scanning recursively in all subdirs. I read (here in ISSUES/NOTES) in the past that there was a way to do this adding at the end of the url "?recursive=1" but this solution doesn't work.
If I add "&recursive=1" there is always no recursively scan.

Does anybody know a solution ?
10x
Reply With Quote
  #8 (permalink)  
Old 10-30-2006, 10:17 AM
Zimbra Employee
 
Posts: 228
Default

Which version are you using? There was a bug (10557) that was fixed in main and should be in the next release (not 4.0.x though). I tried off my main build and it it indeed is searching across all folders.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #9 (permalink)  
Old 10-31-2006, 05:37 AM
Junior Member
 
Posts: 7
Default

Quote:
Which version are you using?
This is the output of zmcontrol -v :
Release 4.0.1_GA_324.RHEL4_20060906182455 CentOS4 NETWORK edition

Which is your version ?
Reply With Quote
  #10 (permalink)  
Old 10-31-2006, 08:46 AM
Zimbra Employee
 
Posts: 228
Default

As I mentioned, it is off of our main branch, which is the next release that isn't a 4.0.x release. I think the current plan is before the end of the year.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
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.