M2SYNC(1)

2024-05-24

NAME

m2sync - IMAP to m2dir synchronization

SYNOPSIS

m2sync [OPTIONS]

DESCRIPTION

m2sync is an IMAP-to-m2dir synchronization tool. At the moment, it has to be run periodically to keep the two synchronized.

By default, it will merge local and remote changes (unless they are in conflict) and apply both to the respective other side. The `--push` or `--pull` arguments can be used to force m2sync to completely overwrite the remote or the local side respectively, regardless of conflicts.

OPTIONS

-a, --account ACCOUNT

The account to operate on (default: first account in config)

-c, --config CONFIG

Set a custom config file location

--check

Check if remote server supports required capabilities

--exclude EXCLUDE

Exclude all mailboxes matching EXCLUDE. Can be used multiple times. Supports * and ? as wildcard characters. The pattern must match the IMAP mailbox name (e.g. folder.mailbox). If a mailbox name matches both exclude and include, exclude takes precendence.

--force

Perform potentially dangerous actions (e.g. deleting mailboxes)

-h, --help

Print help information

--include INCLUDE

Include only mailboxes matching INCLUDE. Can be used multiple times. Supports * and ? as wildcard characters. The pattern must match the IMAP mailbox name (e.g. folder.mailbox). If a mailbox name matches both exclude and include, exclude takes precendence.

--list

List local and remote mailboxes and which actions would be performed on them, then exit.

--pull

Force remote state to local m2dir, discarding local changes

--push

Force local state to remote IMAP mailbox, discarding remote changes

-t, --threads THREADS

Maximum number of threads (and IMAP sessions) to use. The default is 3. If there are less than THREADS mailboxes to sync, the number of threads is reduced accordingly.

--unsafe-tls

Accept untrusted (e.g. self-signed) TLS certificates

-v, --verbose

Increase verbosity (can be used multiple times)

-V, --version

Print version information

CONFIGURATION

m2sync uses the unified configuration file of the Vomit project.

On startup m2sync will look for a file at $XDG_CONFIG_HOME/vomit/config.toml. If unset, $XDG_CONFIG_HOME defaults to ~/.config/.


[example]
local = "~/.mail"
remote = "imap.example.net"
user = "conrad"
pass-cmd = "pass show mail/example.com"
# Or hardcode it:
#password = 'secr3t'

More details about the configuration can be found in the documentation of the vomit-config library at https://docs.rs/vomit-config.

AUTHORS

Maintained by Conrad Hoffmann <ch@bitfehler.net>. m2sync is part of the Vomit project. You can find more information and source code at https://sr.ht/~bitfehler/vomit. Bugs/patches can be submitted by email to the vomit mailing list at ~bitfehler/vomit@lists.sr.ht (see https://lists.sr.ht/~bitfehler/vomit for more information).