{"id":16838636,"url":"https://github.com/jakewharton/docker-mbsync","last_synced_at":"2025-09-18T23:33:01.041Z","repository":{"id":42488333,"uuid":"242060051","full_name":"JakeWharton/docker-mbsync","owner":"JakeWharton","description":"A Docker container which runs the mbsync tool automatically to synchronize your email","archived":false,"fork":false,"pushed_at":"2023-02-22T01:43:39.000Z","size":24,"stargazers_count":89,"open_issues_count":3,"forks_count":11,"subscribers_count":5,"default_branch":"trunk","last_synced_at":"2025-04-02T03:35:00.996Z","etag":null,"topics":["backup","docker","email"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/jakewharton/mbsync/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JakeWharton.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-21T05:15:06.000Z","updated_at":"2025-03-29T13:36:06.000Z","dependencies_parsed_at":"2024-10-27T12:03:28.994Z","dependency_job_id":"8d1bc414-7fb6-41e0-8e9d-ae1d832ef231","html_url":"https://github.com/JakeWharton/docker-mbsync","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/JakeWharton/docker-mbsync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Fdocker-mbsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Fdocker-mbsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Fdocker-mbsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Fdocker-mbsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JakeWharton","download_url":"https://codeload.github.com/JakeWharton/docker-mbsync/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeWharton%2Fdocker-mbsync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275852270,"owners_count":25540136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","docker","email"],"created_at":"2024-10-13T12:24:54.479Z","updated_at":"2025-09-18T23:33:00.704Z","avatar_url":"https://github.com/JakeWharton.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Docker Mailbox Sync\n===================\n\nA Docker container which runs the [`mbsync`][1] tool automatically to synchronize your email.\n\n [1]: http://isync.sourceforge.net/mbsync.html\n\n[![Docker Image Version](https://img.shields.io/docker/v/jakewharton/mbsync?sort=semver)][hub]\n[![Docker Image Size](https://img.shields.io/docker/image-size/jakewharton/mbsync)][layers]\n\n [hub]: https://hub.docker.com/r/jakewharton/mbsync/\n [layers]: https://microbadger.com/images/jakewharton/mbsync\n\n\nSetup\n-----\n\nSelect and create two directories:\n\n * The \"mail\" directory where email will be stored. (From now on referred to as `/path/to/mail`)\n * The \"config\" directory where your configuration file will be stored. (From now on referred to as `/path/to/config`)\n\n\n### Config\n\nIn `/path/to/config`, create a file `mbsync.rc` for configuration.\nSee the [`mbsync`][1] documentation for the syntax of this file.\n\nThe examples in this README mount the destination `/path/to/mail` directory as `/mail` inside of the container.\nIf you are going to follow that, you should use `/mail` as the path in your configuration.\n\nHere is an example, minimal configuration for synchronizing everything in a mailbox:\n```\nIMAPAccount example\nHost imap.example.com\nUser me@example.com\nPass abc123\nAuthMechs LOGIN\nSSLType IMAPS\nPipelineDepth 50\n\nIMAPStore example-remote\nAccount example\n\nMaildirStore example-local\nPath /mail/\nInbox /mail/Inbox\nSubFolders Verbatim\n\nChannel example\nMaster :example-remote:\nSlave :example-local:\nPatterns *\nCreate Slave\nExpunge Slave\nSyncState *\nSync Pull\n```\n\n\n### Initial Sync\n\nThe first time this container runs, it will download all of your historical emails.\n\nIt is not required, but if you'd like to run this sync manually you can choose to do so.\nThis allows you to temporarily interrupt it at any point and also restart if it gets stuck.\n\n```bash\n$ docker run -it --rm\n    -v /path/to/config:/config \\\n    -v /path/to/mail:/mail \\\n    jakewharton/mbsync:1 \\\n    /app/sync.sh\n```\n\nThis will run until all emails have been downloaded. At this point, you should set it up to run automatically on a schedule.\n\n\n### Running Automatically\n\nTo run the sync automatically on a schedule, pass a valid cron specifier as the `CRON` environment variable.\n\n```bash\n$ docker run -it --rm\n    -v /path/to/config:/config \\\n    -v /path/to/mail:/mail \\\n    -e \"CRON=0 * * * *\" \\\n    jakewharton/mbsync:1\n```\n\nThe above version will run every hour and download any new emails. For help creating a valid cron specifier, visit [cron.help][2].\n\n [2]: https://cron.help/#0_*_*_*_*\n\n\n### More\n\nTo be notified when sync is failing visit https://healthchecks.io, create a check, and specify the ID to the container using the `HEALTHCHECK_ID` environment variable.\n\nBecause the sync can occasionally fail, it's best to set a grace period on the check which is a multiple of your cron period. For example, if you run sync hourly give a grace period of two hours.\n\nTo write data as a particular user, the `PUID` and `PGID` environment variables can be set to your user ID and group ID, respectively.\n\n\n### Docker Compose\n\n```yaml\nversion: '2'\nservices:\n  mbsync:\n    image: jakewharton/mbsync:1\n    restart: unless-stopped\n    volumes:\n      - /path/to/config:/config\n      - /path/to/mail:/mail\n    environment:\n      - \"CRON=0 * * * *\"\n      #Optional:\n      - \"HEALTHCHECK_ID=...\"\n      - \"PUID=...\"\n      - \"PGID=...\"\n```\n\nSee https://hub.docker.com/r/jakewharton/mbsync/tags for other tags.\n\n\n\nLICENSE\n======\n\nMIT. See `LICENSE.txt`.\n\n    Copyright 2020 Jake Wharton\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakewharton%2Fdocker-mbsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakewharton%2Fdocker-mbsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakewharton%2Fdocker-mbsync/lists"}