hello, I've posted same question here months ago. But obtaine no answer, even not a "you question is stupid". So I don't know what to think about that. My goal is to be able to find mails quickly with "doveadm search". We are using dovecot in a corporate. And some managers, sometimes ask to delete some messages. These messages are "unwanted" ones: mistakenly sent, defamatory... So, that situations appear rarely, but when asked, they expected me to deleted quickly these messages from few to thousands of users mailboxes. Is that possible to change behaviour of Dovecot, some headers like sender, message-id, date are stored in cache for at least 48h? (7 days would be better). I've read this page : http://wiki2.dovecot.org/Design/Indexes/Cache but cannot understand every parts. "A specific decision can be forced by ORing it with MAIL_CACHE_DECISION_FORCED." Is OR in this sentence like AND/OR comparators? Where to put "MAIL_CACHE_DECISION_FORCED"? "mail-cache-decisions.c file contains the rules how Dovecot changes the decisions." <-- is it in this file? My setup is 2.2.9 on Ubuntu 14.04 running on OpenVZ containers with 2 Director and 2 imap/pop3 backends. The storage is shared via NFS. Is this the performance problem? If dovecot has metadata I want in its cache, I cannot see how this is a problem. Can these settings be useful for my case? mail_always_cache_fields = mail_cache_fields = flags mail_cache_min_mail_count = 0 mail_never_cache_fields = imap.envelope Thanks.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 19 Mar 2015, Vu Ngoc VU wrote:> My goal is to be able to find mails quickly with "doveadm search".What information you are search for? Message-ID, subject, body text? If your data is in the headers, check out: doveconf -a|grep -i cache mail_always_cache_fields mail_cache_fields = flags mail_cache_min_mail_count = 0 mail_never_cache_fields = imap.envelope 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 - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEVAwUBVQrYanz1H7kL/d9rAQInGwf9HSkQr7JhGI/GYH27qiEez2Adnp/7f8Qv PfgcH+PqKpUcvXNM1xRrVXEq4yswNnkEIYjT7gs0NAY/Yr72cT5NuoU6s37yrPYW moC/timqEx8UXafNmB3v+L2U0o0owvfxd4yK93EmUxbe7i91jeYBnKXHKoNA7uNF p3V6ey7qf+CNmFg++rUnmH69iNG12Ia28Gg8ynzc1jZXEDFB2OCB+tFJwjJx2/Y6 Ujgis2JrtI5w086dfMwGnVexqGd697PgSmgYDxX5h8wPe6hd4oUc6dxV1cTlmzwj cjJVVPNHhq37NFr8Uze+eYR3mqTBnex4I37WMCbuAhMgAn4BNOp8Kg==dwNy -----END PGP SIGNATURE-----
> Date: Thu, 19 Mar 2015 15:08:42 > From: Steffen Kaiser <skdovecot at smail.inf.fh-brs.de> > Reply-To: dovecot at dovecot.org > To: Vu Ngoc VU <vvu at mcra.fr> > Cc: dovecot at dovecot.org > Subject: Re: fast doveadm search results > > >> My goal is to be able to find mails quickly with "doveadm search". > > What information you are search for? Message-ID, subject, body text?Thanks for your answer. Yes, I only need doveadm to search for fields that are in envelope or headers. Not the whole body part or the attachments.> If your data is in the headers, check out: > > doveconf -a|grep -i cache > > mail_always_cache_fields > mail_cache_fields = flags > mail_cache_min_mail_count = 0 > mail_never_cache_fields = imap.envelope > > e.g. put message-id into mail_always_cache_fieldsYes, as I didn't yet set anything, it looks like this. If I record correctly, I've pasted it in my initial post. OK, I'll try to change mail_always_cache_fields.