Steffen Kaiser writes:> e.g. put message-id into mail_always_cache_fields > > - From http://dovecot.org/pipermail/dovecot-cvs/2013-May/023261.html > > lib-storage: Allow mail_*cache_fields settings to specify any hdr.* fields... but I belatedly wrote ...> Maybe you can even add these items into the cache upon delivery, > but someone more knowlegable than I would have to help you with that.The drawback of getting thing in digest form -- you look like a boob when answering late. I defer to Steffen's superior knowledge. Joseph Tam <jtam.home at gmail.com>
> Date: Fri, 20 Mar 2015 02:05:48 > From: Joseph Tam <jtam.home at gmail.com> > To: dovecot at dovecot.org > Subject: Re: fast doveadm search results > > Steffen Kaiser writes: > >> e.g. put message-id into mail_always_cache_fields >> >> - From http://dovecot.org/pipermail/dovecot-cvs/2013-May/023261.html >> >> lib-storage: Allow mail_*cache_fields settings to specify any hdr.* fields > > ... but I belatedly wrote ...ahah, in France, we says "that happens">> Maybe you can even add these items into the cache upon delivery, >> but someone more knowlegable than I would have to help you with that. > > The drawback of getting thing in digest form -- you look like a boob > when answering late. I defer to Steffen's superior knowledge.Don't blame yourself. It's not a problem to me receiving twice same answer. I prefer more to less :) (not about unix tools) But to answer your questions, I'm not really interested in purging the cache data. I just think that cache has expiration delay. The only point is to get this "doveadm search" answering me in minutes instead of hours. Writing my original post, I didn't get if it was slow because of: - data I'm searching are not cached at all? (headers like From, Date, Message-ID...) => I wanted to know if dovecot allows to add some headers. Stephen answered to that question. - these data a cache, but for an extremely short time, like the user session => that's why I asked if it is possible to extend cache validity to at least 48h. But for sure, if these data remain forever, it'll be better ! :) - NFS limitations => do I have to re-install dovecot on my NFS servers? I prefer not.
On 20 Mar 2015, at 10:37, Vu Ngoc VU <vvu at mcra.fr> wrote:> > But to answer your questions, I'm not really interested in purging the cache data. > I just think that cache has expiration delay. > The only point is to get this "doveadm search" answering me in minutes instead of hours. > Writing my original post, I didn't get if it was slow because of: > - data I'm searching are not cached at all? (headers like From, Date, Message-ID...) > => I wanted to know if dovecot allows to add some headers. > Stephen answered to that question.By default all headers are added to cache the first time they're accessed in the folder (e.g. via FETCH or SEARCH). Also mails that are newly delivered by Dovecot will add those headers to cache immediately.> - these data a cache, but for an extremely short time, like the user session > => that's why I asked if it is possible to extend cache validity to at least 48h. > But for sure, if these data remain forever, it'll be better ! :)Dovecot automatically figures out if the data should stay in cache for 1 week or forever. It sounds like something's wrong in your system if it's not already automatically performing fast searches. The first time a search on a header is done it might be slow if the data isn't in cache, but all subsequent times should be very fast. Not hours or minutes but seconds. No need to modify the mail_cache_* settings. It might be helpful if you posted your whole doveconf -n output.> - NFS limitations > => do I have to re-install dovecot on my NFS servers? I prefer not.What do you mean by this? You're using NFS now to store emails but with one Dovecot server? That should work fine, although NFS of course always adds some extra overhead.