On 20 Mar 2015, at 10:37, Vu Ngoc VU vvu@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.