<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Il 02/10/2018 12:08, Timo Sirainen ha scritto:<br>
    </p>
    <blockquote type="cite"
      cite="mid:5285B8C3-B87F-4C5A-8363-397B1452AECD@iki.fi">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      On 2 Oct 2018, at 12.22, Alessio Cecchi <<a
        href="mailto:alessio@skye.it" class="" moz-do-not-send="true">alessio@skye.it</a>>
      wrote:<br class="">
      <div>
        <blockquote type="cite" class=""><br
            class="Apple-interchange-newline">
          <div class="">
            <meta http-equiv="content-type" content="text/html;
              charset=windows-1252" class="">
            <div text="#000000" bgcolor="#FFFFFF" class="">
              <p class="">Hello,<br class="">
                <br class="">
                we are developing a library to show last arrived
                messages of all threads in a folder with more than 300k
                messages.<br class="">
                <br class="">
                As per the RFC 5256, the IMAP thread command has only
                the option to specify the grouping criteria (REFERENCES
                vs ORDEREDSUBJECT). So we implemented an algorithm which
                gets the full UID SORT ordered by date in reverse order
                then gets all thread relations and then post process all
                outputs to obtain the final result.<br class="">
              </p>
            </div>
          </div>
        </blockquote>
        <div>It sounds like what you want is REFS threading, which
          Dovecot supports, but it didn't make it into official RFC: <a
href="https://tools.ietf.org/html/draft-gulbrandsen-imap-inthread-05"
            class="" moz-do-not-send="true">https://tools.ietf.org/html/draft-gulbrandsen-imap-inthread-05</a></div>
      </div>
      <br class="">
    </blockquote>
    Thanks Timo, <br>
    <br>
    you are the best!<br>
    <br>
    p.s. was a pleasure to meet you and the OX team in Rome last week<br>
    <pre class="moz-signature" cols="72">-- 
Alessio Cecchi
Postmaster @ <a class="moz-txt-link-freetext" href="http://www.qboxmail.it">http://www.qboxmail.it</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/alessice">https://www.linkedin.com/in/alessice</a></pre>
  </body>
</html>