From dbbda75e30e38b3cc332fc0d9e6cbc71dd601667 Mon Sep 17 00:00:00 2001 From: wbk <65588801+wbxqm@users.noreply.github.com> Date: Sun, 17 Oct 2021 12:09:22 +0200 Subject: [PATCH] Add isync/mbsync chapter and config Short intro of isync/mbsync; how to install, configure and run (with example config) --- .../06.email_migration/email_migration.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/pages/01.administrate/07.specific_use_cases/06.email_migration/email_migration.md b/pages/01.administrate/07.specific_use_cases/06.email_migration/email_migration.md index 20d40c0e5..0b92538ea 100644 --- a/pages/01.administrate/07.specific_use_cases/06.email_migration/email_migration.md +++ b/pages/01.administrate/07.specific_use_cases/06.email_migration/email_migration.md @@ -44,3 +44,62 @@ Transfer emails from one server to another: larch -a -f imaps://serveur_d'origine.org -t imaps://serveur_de_destination.org ``` For other types of transfer refer to [Larch documentation](https://github.com/rgrove/larch#label-Usage). + +### mbsync/isync + +[isync site](https://isync.sourceforge.io/) + +The names isync (the project) and mbsync (the program) are about the same 'thing' + +The program is available in the Debian repositories. Install by: +```bash +sudo apt install isync +``` + +To run mbsync, a configuration file in your home directory is needed. Then run: +```bash +mbsync -a +``` + +A configuration file for syncing two IMAP mailboxes looks like: +``` +# old account +## account access definition +IMAPAccount friendly_name # free format +Host imap.domain.tld # the old/existing mailserver +User email_address@domain.tld # your credentials for that server +Pass secret_password # +SSLType IMAPS # probably IMAPS +CertificateFile /etc/ssl/certs/ca-certificates.crt + +## mbsync account/data reference +IMAPStore friendly_name # free format, easy when identical +Account friendly_name # has to match IMAPAccount above + + +# new account +## account access definition +IMAPAccount yuno # again, give it a recognizable name +Host mydomain.tld # the new Yunohost mailserver +User my_yuno_user # your Yunohost SSO username +Pass password # and pass +SSLType IMAPS # IMAPS for Yunohost +CertificateFile /etc/ssl/certs/ca-certificates.crt + +## mbsync account/data reference +IMAPStore yuno # again, free to choose, both yuno is easy +Account yuno # again, has to match the name above + +# synchronization definition +Channel oldmail2yuno # give this combination of settings a name +Master :friendly_name: # the IMAPStore-name where the old mail is +Slave :yuno: # the IMAPStore-name of your new Yunohost +Patterns * # probably you want everything ... +CopyArrivalDate yes # ... with the original date +Create Slave # if folder/mail does not exist, create it on Yunohost +Expunge None # don't throw things away +Sync All # without sync it would not be so useful +# this directory needs to exist; mkdir manually in advance +Syncstate /home/my_yuno_user/.mbsync_state/ # mkdir `name` has to match this setting, of course + +```