Skip to content

drieschel/mailboxsync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mailboxsync

Easy-to-use tool to synchronize multiple mailboxes at the same time. It uses imapsync for the synchronization process.

Usage (with Docker)

  1. Create config/mailboxes.json and fill it with the required data (see section below)
  2. Execute make run
  3. Grab a coffee ☕ and make yourself comfortable

Tip

You can tail the logs in var/log from different mailboxes during the sync

Tip

Use the variable CONCURRENT_SYNCS in case you want to adjust the amount of concurrent mailbox syncs. Default is 3.

make run CONCURRENT_SYNCS=5

Mailbox JSON example

Required server and mailbox data has to be provided in a JSON file

[
  {
    "src": {
      "host": "src.imap-server.tld"
    },
    "dst": {
      "host": "dst.imap-server.tld"
    },
    "mailboxes": [
      {
        "user": "[email protected]",
        "password": "verysecretpassword",
        "srcUser": "[email protected]",
        "srcPassword": "verysecretpassword",
        "dstUser": "[email protected]",
        "dstPassword": "verysecretpassword"
      },
      {
        "user": "[email protected]",
        "password": "passwordsecretvery",
        "srcUser": "[email protected]",
        "srcPassword": "passwordsecretvery",
        "dstUser": "[email protected]",
        "dstPassword": "passwordsecretvery",
        "active": false
      }
    ]
  }
]

Every element in the list is a Sync object. A Sync object consists of all required data for synchronizing mailboxes between src and dst.

Types

Reference about the types which have to be defined in the JSON file.

ImapServer

Consists of all required data to establish a connection to an IMAP server

Name Type Description
host string Domain or IP of the IMAP server Required
port integer Port of the IMAP server Default: 143

Mailbox

Consists of all required credentials to connect to the mailboxes which have to be synchronized

Name Type Description
user string Username for source and/or destination mailbox Required
password string Password for source and/or destination mailbox Required
srcUser string Will be used as username for the source mailbox in case it is set. Otherwise user will be taken.
srcPassword string Will be used as password for the source mailbox in case it is set. Otherwise password will be taken.
dstUser string Will be used as username for the destination mailbox in case it is set. Otherwise user will be taken.
dstPassword string Will be used as password for the destination mailbox in case it is set. Otherwise password will be taken.
active boolean De-/Activate mailbox for synchronization Default: true

Sync

Contains all required data to synchronize one or more mailboxes between two servers at the same time

Name Type Description
src ImapServer Connection data for the source IMAP server Required
dst ImapServer Connection data for the destination IMAP server Required
mailboxes Mailbox[] List of mailboxes which have to be synchronized between src and dst Required

Misc

In case you miss an option from imapsync or a specific feature, don't hesitate to create an issue or a PR.

About

Synchronizing multiple mailboxes at once

Resources

License

Stars

Watchers

Forks

Packages

No packages published