aboutsummaryrefslogtreecommitdiff
path: root/articles/2021/Mbsync-push.html
blob: 2d5894bf18a1370c124c0b89883298ac76cf13ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!doctype html>
<html lang="EN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="/style.css">
    <title>Bloggings</title>
  </head>
  <body>
    <header>
      <h1>Bloggings</h1>
      <a href="/index.php">Back</a>
      
    </header>
    
<main>
<article>
<h2>Mbsync push</h2>
<h3>2021-05-04</h3>
<p>J'ai bêtement copié mon .mbsyncrc sur mon nouvel ordinateur portable avant de copier le dossier .mail. Le résultat a été que mbsync a supprimé tout le courrier sur mon serveur
IMAP.</p>
<p>J'ai donc dû tout repousser depuis le dossier .mail de mon ancien ordinateur portable. Heureusement, il y a un bon guide en ligne
<a href="https://aaronweb.net/blog/2014/11/migrating-mail-between-imap-servers-using-mbsync/">ici</a></p>
<p>L'astuce consiste à remettre à zéro le dossier .mail local en supprimant toutes les informations précédentes de mbsync.</p>
</p>retirer toutes les fichiers .mbsyncstate et .uidvalidity:</p>
<code>find . -type f -name '.??*' -delete</code>
<p>Ensuite retirer les identifiants mbsync des noms des fichiers mail:</p>
<code>find . -type f -name '*U=*' | { while read f; do mv "$f" "`echo $f | sed -e 's/,U=[0-9]*//'`"; done }</code>
<p>J'ai ensuite supprimé tous les dossiers sur mon serveur IMAP et j'ai procédé à leur restauration avec un push mbsync.</p>
</article>
</main>
<footer>
<p>&nbsp;</p><p>§</p></footer>
</body></html>