CLI tool to synchronize emails between Source and Destination servers over secure port tcp/993 (IMAP over TLS).
- Config File (
-c
or--config
): Path to Configuration File - Verbosity (
-v
or--verbose
): OutputDEBUG
Logs - Quiet (
-q
or--quiet
): No Output - Help (
-h
or--help
): Show Help Menu - Version (
-V
or--version
): Show Version
list
: List Source Mailboxessync
: Synchronize Mailboxeshelp
: Show Help Message
- Create a basic
creds.conf
file
[src]
host="mail.example.com"
user="test@example.com"
password="MyMailPassword"
[dst]
host="mail2.example.com"
user="test2@example.com"
password="MyMail2Password"
- Execute
list
command to list source mailboxes
mail_sync -c creds.conf list
- (Optional) Modify
src
section oncreds.conf
to filter certain mailboxes withinclude
&exclude
keywords. This specific example syncs all (*
) mailboxes butINBOX
,Sent
&Trash
, which are ignored.
[src]
host="mail.example.com"
user="test@example.com"
password="MyMailPassword"
include="*"
exclude="INBOX,Sent,Trash"
[dst]
host="mail2.example.com"
user="test2@example.com"
password="MyMail2Password"
- Execute
sync
command to synchronize mailboxes
mail_sync -c creds.conf sync
- Visit Release page
- Download pre-built binary based on your platform:
- Windows (
mail_sync.exe
) - Linux AMD64 (
mail_sync_amd64
) - MacOS (
mail_sync_darwin
)
- Windows (
Requirements
Steps
- Clone repository
git clone https://github.com/pcs289/mail_sync.git
- Compile source code
cd mail_sync
cargo build --release