@tribe-x/imapsync
v0.0.2
Published
Imapsync command and library to synchronize 2 imap accounts
Readme
IMAPSYNC
A Node.js library for migrating emails between IMAP servers. Includes a developer-friendly CLI for testing and local development. Inspired by IMAPSYNC https://imapsync.lamiral.info/
Installation
npm install
Running the migration (for development)
Set up environment variables
Copy the example environment file and adjust values for your local setup:
cp .env.example .envRun the migration script or cli
node src/scripts/runMigrations.jsOR
npm run migratewhich is equivelent to
node src/bin/cli.jsTesting
- to run unittests using jest
npm testSupported Migration Paths
| Source | Destination | Status | Notes | |--------|------------|--------|-------| | Gmail | Iroco | ⚠️ WIP | Supports Mailbox |
Credentials & Requirements
Before performing a migration, you need to provide the following information for both the source and destination accounts:
Email address – identifies the account on the IMAP server.
Access Token - OAuth2 access token, if using OAuth2 authentication.
Password or app password – Password for regular authentication.
The requirements vary slightly depending on the email provider:
| Provider | Required Input | Notes | |----------|----------------------------------------|-------| | Gmail | Email + (OAuth Access Toekn OR App Password) | regular password does not work for Gmail. You can either use OAuth access token (recommended by Google) or App Password with 2FA Learn how to generate an App Password | | Iroco | Email + Password | Regular account password is used for IMAP access. |
