Re: What to do about SEARCH?
Roger Merchberger <[email protected]> Thu, 06 Mar 2003 15:31:50 -0500
| Newsgroups | gmane.mail.bikini.devel |
|---|---|
| Message-ID | <[email protected]> |
Rumor has it that Charles Cazabon may have mentioned these words: >Greetings, > >The spec has had an unspecified SEARCH command for a while now. I'd like to >either fill this out, or remove the command. I don't know which to do. My opinion - fill it out. The reason: it would improve the "telnet-friendliness" (i.e. clientless) of checking mailboxen for a particular message... "Did I get any new mail from John doe?" kinda thing. You could then tell the client to download any messages meeting said criteria, instead of downloading the whole kit-n-kaboodle... >However, to do any kind of meaningful content search, the server almost >certainly has to parse and un-MIME-ify a message, because otherwise any >content transfer encoding other than 7bit or 8bit would cause false negatives >or false positives. This is really ugly. Yes, yes it is. I'd say no to a body search [on more than one level... ;-) ] >An alternative would be to only search the message header. Is that even >useful? Yes, for the reasons above. (well, for me, anyway) >Then, if search is necessary, what form does it take? Simple substring >matches? Full-blown pcre? Somewhere in between? My python book's on order, so I don't know much about it yet, but how easy is it to implement pcre searches? If it's simple, then I'd say have a single-char tag or delimiter (say, slashes, just like perl) -- would that make it farily easy to implement? Like this: PCRE search is surrounded by /'s: SEARCH /From: .*30below\.com/ would return any messages from anyone on 30below.com's domain (nice for checking local mail) -- whereas: SEARCH 30below.com would return all the messages with any header that contained that (in my case, all of 'em...) If it wouldn't be hard to set up pcre searching, this wouldn't be a bad way to go, IMHO. If it would be difficult to set up pcre grepping, I'd say just go with a straight text search... I would think that that would cover the lion's share [trying to keep sufficiently vague so I don't get the "Don't Speculate, Profile"(TM) speech... ] and the rest, folks would just have to get inventive with... ;-) >Lots of questions. Few answers. Sounds like Radio Shack... Anywho, that's what I think... Roger "Merch" Merchberger -- Roger "Merch" Merchberger -- sysadmin, Iceberg Computers [email protected] What do you do when Life gives you lemons, and you don't *like* lemonade?????????????