[Dovecot] extended search

Timo Sirainen tss at iki.fi
Mon Sep 6 20:22:19 EEST 2010


On Mon, 2010-09-06 at 19:13 +0200, Daniel-Constantin Mierla wrote:
> >> is it safe to use arg_new_human_date() from
> >> src/lib-storage/mail-search-register-human.c instead of arg_new_date()
> >> inside src/lib-storage/mail-search-register-imap.c?
> > I guess.
> >
> >> The benefit is ability to use interval based search rules, e.g., SINCE
> >> 2days. I run it for couple of days and looks fine, used for virtual folders.
> > It's still possible, although less human friendly: "younger
> > 172800" (i.e. younger than 172800 seconds).
> I tried that, but for some reason it didn't returned proper results 
> (might have been related to importing the emails to dovecot). Besides 
> more human friendly, "since" worked fine. Also, younger is for internal 
> date only, does not work for email's Date header (sentbefore/sentsince...)

Well, the other thing I had been thinking previously was that maybe the
dovecot-virtual files should use human parser for everything. I don't
anyway really like the idea of exposing the "2days" extension to regular
IMAP clients. Maybe some day there really is such an extension that is
also incompatible with what Dovecot does..

Maybe there could be some command at the beginning of dovecot-virtual
file specifying if human parser or imap parser should be used. Or maybe
just a plugin setting. Hmm.



More information about the dovecot mailing list