mirror of
https://github.com/nodemailer/wildduck.git
synced 2024-12-26 09:50:47 +08:00
Updated migration guide (markdown)
parent
570075ffeb
commit
6d844f44a6
1 changed files with 46 additions and 0 deletions
|
@ -96,6 +96,52 @@ mkdir anon_maildir; cd anon_maildir
|
|||
readpst -M anon_inbox.pst
|
||||
```
|
||||
|
||||
## Migrate maildir to WildDuck
|
||||
|
||||
There are multiple ways to import maildir into WildDuck
|
||||
|
||||
### 1. import-maildir tool
|
||||
|
||||
You can use [import-maildir](https://github.com/nodemailer/import-maildir) tool to import maildir files straight to WildDuck database. You would need to have access to WildDuck database servers and the tool is tested on Courier based maildir folders, so it might not handle all extra additions of Dovecot maildir.
|
||||
|
||||
```
|
||||
$ git clone git://github.com/nodemailer/import-maildir.git
|
||||
$ cd import-maildir
|
||||
$ npm install --production
|
||||
```
|
||||
|
||||
Next edit config/default.toml and set correct MongoDB and Redis settings. There are other tunable properties as well but these could be left as is.
|
||||
|
||||
```
|
||||
$ nano config/defualt.toml
|
||||
```
|
||||
|
||||
Once everything is set up you can start the importer
|
||||
|
||||
```
|
||||
$ ./bin/import-maildir userid:maildirpath
|
||||
```
|
||||
|
||||
Where
|
||||
|
||||
* **userid** is either user id (24byte hex), username or an email address of the user to be imported (the user account must already exists in WildDuck)
|
||||
* **maildirpath** is the maildir folder location of that user
|
||||
|
||||
```
|
||||
$ ./bin/import-maildir user@example.com:/var/mail/user_example.com/
|
||||
```
|
||||
|
||||
If you want to import multiple users, then you can do so with a single command
|
||||
|
||||
```
|
||||
$ ./bin/import-maildir user1@example.com:/var/mail/user1_example.com/ user2@example.com:/var/mail/user2_example.com/ user3@example.com:/var/mail/user3_example.com/
|
||||
```
|
||||
> In case of multiple users you might want to edit `uploaders` value to something greater than 1. This would allow to import users in parallel.
|
||||
|
||||
### 2. mbsync tool
|
||||
|
||||
mbsync is a proven tool but to use it you need to know the passwords of IMAP users. Additionally it is much slower than import-maildir as there is IMAP overhead.
|
||||
|
||||
Sync emails (in maildir format) to wildduck:
|
||||
```
|
||||
$ cat ~/.mbsyncrc
|
||||
|
|
Loading…
Reference in a new issue