Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating from old mail provider to Yunohost: add isync/mbsync chapter and config #1799

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 protected] # 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

```