<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Gionatan,<br>
    I believe the tool you're looking for is 'mbtool'  From the man
    page:<br>
    <blockquote>
      <pre>DESCRIPTION
       mbtool  is  a  tool  for performing various actions on the indexes of a
       list of mailboxes. The only actions currently supported are  -t,  which
       will  normalize the internaldate time stamp of each record in the index
       to GMT, and -r which will create a new unique ID for each mailbox.
...
       -t     Normalize  internaldate on all index records of all listed mail‐
              boxes to match the Date: header if theyâre off by  more  than  a
              day,  which  can  be used to fix up a mailbox which has been re‐
              stored from backup and lost its internaldate information.
...
<span class="highlighted">EXAMPLES</span><strong><span class="highlighted">
mbtool</span> -t</strong> user.jsmith

</pre>
      <blockquote>
        <div>Normalize <code class="docutils literal"><span class="pre">internaldate</span></code>
          on all index records in
          <em>user.jsmith</em>.</div>
      </blockquote>
      <div class="highlight-default">
        <div class="highlight">
          <pre><span></span><span class="n">Working</span> <span class="n">on</span> <span class="n">user</span><span class="o">.</span><span class="n">jsmith</span><span class="o">...</span>
<span class="mi">00000001</span><span class="p">:</span> <span class="n">Tue</span><span class="p">,</span> <span class="mi">08</span> <span class="n">Jul</span> <span class="mi">2014</span> <span class="mi">16</span><span class="p">:</span><span class="mi">45</span><span class="p">:</span><span class="mi">18</span> <span class="o">-</span><span class="mi">0500</span> <span class="o">=></span> <span class="n">Mon</span><span class="p">,</span> <span class="mi">07</span> <span class="n">Jul</span> <span class="mi">2014</span> <span class="mi">20</span><span class="p">:</span><span class="mi">44</span><span class="p">:</span><span class="mi">18</span> <span class="o">+</span><span class="mi">0000</span>
<span class="mi">00000002</span><span class="p">:</span> <span class="n">Tue</span> <span class="n">Jul</span> <span class="mi">08</span> <span class="mi">16</span><span class="p">:</span><span class="mi">45</span><span class="p">:</span><span class="mi">13</span> <span class="n">CDT</span> <span class="mi">2013</span> <span class="o">=></span> <span class="n">Fri</span><span class="p">,</span> <span class="mi">30</span> <span class="n">Aug</span> <span class="mi">2013</span> <span class="mi">19</span><span class="p">:</span><span class="mi">46</span><span class="p">:</span><span class="mi">03</span> <span class="o">+</span><span class="mi">0000</span>
<span class="o"><...></span>
</pre>
        </div>
      </div>
    </blockquote>
<a class="moz-txt-link-freetext" href="http://www.cyrusimap.org/imap/reference/manpages/systemcommands/mbtool.html?highlight=mbtool">http://www.cyrusimap.org/imap/reference/manpages/systemcommands/mbtool.html?highlight=mbtool</a><br>
    <br>
    Cheers,<br>
        -nic<br>
    <br>
    <div class="moz-cite-prefix">On 7/31/20 6:39 AM, Gionatan Danti
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:3457db84ec8470540aea0d724ff76f80@assyoma.it">Hi all,
      <br>
      I just noticed the dates of some old emails are wrongly displayed
      on roundcube webmail.
      <br>
      <br>
      In short, the list view shows the filesystem date of the affected
      messages (ie: mtime of u.1 file), rather than what is found in the
      "Date:" header field
      <br>
      <br>
      These were emails migrated from an old system, but I vaguely
      remember I had some issue at the time which I solved with some
      combination of rsync+imapsync.
      <br>
      <br>
      Can "reconstruct" be used to repopulate the index file with the
      correct date from "Date:" field? If not, what I can do to solve
      the issue? I already tried "reconstruct -u user@domain -x -f -r
      -G", but with no avail.
      <br>
      <br>
      Thanks.
      <br>
      <br>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Nic Bernstein                               <a class="moz-txt-link-abbreviated" href="mailto:nic@nicbernstein.com">nic@nicbernstein.com</a>
<a class="moz-txt-link-freetext" href="https://www.nicbernstein.com">https://www.nicbernstein.com</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/nic-b-26577a178/">https://www.linkedin.com/in/nic-b-26577a178/</a>
</pre>
  </body>
</html>