Ramprasad A Padmanabhan wrote:

On Thu, 2004-01-22 at 19:14, Sergio Devojno Bruder wrote:

/Ramprasad A Padmanabhan wrote:
I am using cyrus mailboxes to store rss feeds users have subscribed to. Now I am putting special headers in the mails for every feed which are specific to my application.

I want to do an optimum search on all mailboxes somewhat like
"select all mails from all mailboxes where header Xmyheader is myvalue"

Is there a way I can do such a search without crashing my (already loaded) imap server.
I was thinking if there was a way to directly access the cyrus.header files from all mailboxes that can give me this result. Presently I am using Mail::IMAPClient perl module to talk imap to the server


Thanks
Ram

Probably Cyrus inst caching your Xmyheader.


Change Cyrus to cache|index your Xmyheader, this will allow your search without acessing every mail./



Precisely, How do I do that. Is there a howto somewhere

If you're using v2.2.3, its fairly easy. In mailbox.h, bump MAILBOX_CACHE_MINOR_VERSION to 3 and in mailbox.c add an entry like {"Xmyheader", 3} to the mailbox_cache_headers array. Any new messages added to the mailbox will have this header cached. If you want all of the messages to have this header cached, then you'll have to reconstruct the mailbox.


--
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp

Reply via email to