# vsync IMAP to maildir synchronization
[](https://crates.io/crates/vsync)
[](https://builds.sr.ht/~bitfehler/vomit-sync/commits?)
Vsync is a small CLI wrapper around [vomit-sync][1]. It aims to provide access
to all functions that vomit-sync offers. Currently, syncing a local maildir
and a remote IMAP mailbox in both directions is supported. Vsync has to be run
periodically to keep the two synchronized.
**NOTE:** until vsync has reached version 1.0 it has to be considered
experimental, and it is entirely possible that it will **delete your email**!
Here is some quick steps to hopefully avoid that:
* As of version 0.9.3, vsync will refuse to delete an entire mailbox (folder)
unless the `--force` option is used
* The code paths for one-way and two-way sync are explicitly kept seperate, so
if you just want to get the remote state locally, run `vsync --pull`, it will
not touch your remote mailbox
* A state cache is required for two-way sync to function properly, but caches
are hard. One area of concern are potentially untested failure cases:
* After any failed or interrupted sync, run `vsync --list` and inspect the
result
* If in doubt, run `vsync --pull` once (potentially undoing some local
changes) to get back to a clean state
Reach out to the [mailing list][3] if you have questions.
[1]: https://crates.io/crates/vomit-sync "vomit-sync on crates.io"
For more usage information, see the [man page][5].
[5]: https://bitfehler.net/man/vsync.1.html "vsync(1) man page"
# Configuration
vsync uses [vomit-config][4], which means the default configuration file
location is `$XDG_CONFIG_DIR/vomit/config.toml` (usually
`~/.config/vomit/config.toml`).
[4]: https://docs.rs/vomit-config
Example configuration file:
```
[myaccount]
local = "~/.maildir"
remote = "imap.example.com:993"
user = "myusername"
pass-cmd = "pass show mail/myaccount"
# or use this:
#password = "s3cr34"
```
## The Vomit project
Both vomit-sync and vsync are part of the [Vomit project][2].
[2]: https://sr.ht/~bitfehler/vomit "Vomit project page on SourceHut"
## Contributing
Please send patches to the [vomit mailing list][3].
## Feedback
The [mailing list][3] is open for all kinds of feedback, questions, and
discussions.
[3]: https://lists.sr.ht/~bitfehler/vomit "The Vomit mailing list"