{"id":21698628,"url":"https://github.com/theohbrothers/docker-isync","last_synced_at":"2025-08-30T09:18:00.829Z","repository":{"id":153156927,"uuid":"624607909","full_name":"theohbrothers/docker-isync","owner":"theohbrothers","description":"Dockerized isync 🐳 ","archived":false,"fork":false,"pushed_at":"2025-05-19T07:39:33.000Z","size":123,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-19T08:45:29.627Z","etag":null,"topics":["backup","buildx","cron","docker","generate-dockerimagevariants","imap","isync","maildir","mbsync","notifications","pingme","restic"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theohbrothers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2023-04-06T21:12:53.000Z","updated_at":"2025-05-19T07:39:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"a4cdc56d-b5cf-4561-8f49-c1dcf89bb796","html_url":"https://github.com/theohbrothers/docker-isync","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/theohbrothers/docker-isync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theohbrothers%2Fdocker-isync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theohbrothers%2Fdocker-isync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theohbrothers%2Fdocker-isync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theohbrothers%2Fdocker-isync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theohbrothers","download_url":"https://codeload.github.com/theohbrothers/docker-isync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theohbrothers%2Fdocker-isync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272829593,"owners_count":25000257,"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-08-30T02:00:09.474Z","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","buildx","cron","docker","generate-dockerimagevariants","imap","isync","maildir","mbsync","notifications","pingme","restic"],"created_at":"2024-11-25T19:35:36.737Z","updated_at":"2025-08-30T09:18:00.798Z","avatar_url":"https://github.com/theohbrothers.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-isync\n\n[![github-actions](https://github.com/theohbrothers/docker-isync/actions/workflows/ci-master-pr.yml/badge.svg?branch=master)](https://github.com/theohbrothers/docker-isync/actions/workflows/ci-master-pr.yml)\n[![github-release](https://img.shields.io/github/v/release/theohbrothers/docker-isync?style=flat-square)](https://github.com/theohbrothers/docker-isync/releases/)\n[![docker-image-size](https://img.shields.io/docker/image-size/theohbrothers/docker-isync/latest)](https://hub.docker.com/r/theohbrothers/docker-isync)\n\nDockerized [isync](https://sourceforge.net/projects/isync/).\n\nisync syncs an IMAP mailbox to a Maildir (emails as individual files), in contrast to [imap-backup](https://github.com/theohbrothers/docker-imap-backup) which syncs an IMAP Mailbox as `.mbox` backup files. Additionally, isync can also sync two IMAP mailboxes.\n\n## Tags\n\n| Tag | Dockerfile Build Context |\n|:-------:|:---------:|\n| `:1.5.0`, `:latest` | [View](variants/1.5.0) |\n| `:1.5.0-pingme` | [View](variants/1.5.0-pingme) |\n| `:1.5.0-restic` | [View](variants/1.5.0-restic) |\n| `:1.5.0-restic-pingme` | [View](variants/1.5.0-restic-pingme) |\n| `:1.4.4` | [View](variants/1.4.4) |\n| `:1.4.4-pingme` | [View](variants/1.4.4-pingme) |\n| `:1.4.4-restic` | [View](variants/1.4.4-restic) |\n| `:1.4.4-restic-pingme` | [View](variants/1.4.4-restic-pingme) |\n\n- `restic`: Includes [`restic`](https://github.com/restic/restic). Useful for [cron-based backups](#cron-and-notifications).\n- `pingme`: Includes [`pingme`](https://github.com/kha7iq/pingme). Useful for sending notifications to [well-known services](https://pingme.lmno.pk/#/services).\n  - Note: `pingme` variants have fewer architectures. More architectures will be added in future.\n\nAll images contain:\n\n-  `curl` and `jq`, which are useful for sending notifications if needed\n- `rsync` which is useful for incrementally copying mails or backups\n\n## Usage\n\n\u003e Note: `isync` the project name, `mbsync` is the tool.\n\nThe `mbsync` config file used in this image is `/mbsyncrc`. The volume used to store local Maildir is `/mail`. The main sync script is `/sync`.\n\nHere are three common sync cases:\n\n- [IMAP to Maildir](#imap-to-maildir) - One-way sync of IMAP server to local Maildir\n- [Maildir to IMAP](#maildir-to-imap) - One-way sync of local Maildir to IMAP server\n- [IMAP to IMAP](#imap-to-imap) - One-way sync of IMAP server to another IMAP server\n\nFor cron-based examples, see [below](#cron-and-notifications).\n\nFor a simple demo of the three sync cases, see this `docker-compose` [demo](docs/examples/demo).\n\nIf needed, see [official docs](https://isync.sourceforge.io/).\n\n### IMAP to Maildir\n\nThis syncs `test@example.com` to a local Maildir `/mail`.  Sync state is kept in each folder in `/mail`.\n\nCreate config file `mbsyncrc`:\n\n```sh\n$ cat mbsyncrc\nIMAPStore example-remote\nHost imap.example.com\nUser test@example.com\nPass test\nAuthMechs LOGIN\nSSLType IMAPS\n# Limit the number of simultaneous IMAP commands\nPipelineDepth 30\n\nMaildirStore example-local\nSubFolders Verbatim\n# The trailing '/' is important for Path\nPath /mail/\nInbox /mail/INBOX\n\nChannel example\nFar :example-remote:\nNear :example-local:\nPatterns *\nCreate Near\nExpunge Near\nSyncState *\nSync Pull\n```\n\nSync:\n\n```sh\ndocker run --rm -it -v $(pwd)/mbsyncrc:/mbsyncrc:ro -v mail:/mail theohbrothers/docker-isync:latest\n```\n\n### Maildir to IMAP\n\nThis syncs a local Maildir `/mail` to `test2@example.com`. Sync state is kept in each folder in `/mail`.\n\nCreate config file `mbsyncrc`:\n\n```sh\n$ cat mbsyncrc\nIMAPStore example-remote-2\nHost imap.example.com\nUser test2@example.com\nPass test\nAuthMechs LOGIN\nSSLType IMAPS\n# Limit the number of simultaneous IMAP commands\nPipelineDepth 30\n\nMaildirStore example-local\nSubFolders Verbatim\n# The trailing '/' is important for Path\nPath /mail/\nInbox /mail/INBOX\n\nChannel example\nFar :example-remote-2:\nNear :example-local:\nPatterns *\nCreate Far\nExpunge Far\nSyncState *\nSync Push\n```\n\nSync:\n\n```sh\ndocker run --rm -it -v $(pwd)/mbsyncrc:/mbsyncrc:ro -v mail:/mail theohbrothers/docker-isync:latest\n```\n\n### IMAP to IMAP\n\nThis syncs `test@example.com` to `test3@example.com`. Sync state is kept in the `/mbsync` volume. The `/mail` volume is not used since there's no local Maildir.\n\nCreate config file `mbsyncrc`:\n\n```sh\n$ cat mbsyncrc\nIMAPStore example-remote\nHost imap.example.com\nUser test@example.com\nPass test\nAuthMechs LOGIN\nSSLType IMAPS\n# Limit the number of simultaneous IMAP commands\nPipelineDepth 30\n\nIMAPStore example-remote-3\nHost imap.example.com\nUser test3@example.com\nPass test\nAuthMechs LOGIN\nSSLType IMAPS\n# Limit the number of simultaneous IMAP commands\nPipelineDepth 30\n\nChannel example\nFar :example-remote:\nNear :example-remote-3:\nPatterns *\nCreate Near\nExpunge Near\nSyncState /mbsync/\nSync Pull\n```\n\nSync:\n\n```sh\ndocker run --rm -it -v $(pwd)/mbsyncrc:/mbsyncrc:ro -v mbsync:/mbsync theohbrothers/docker-isync:latest\n```\n\n### Cron and notifications\n\nFor cron-based sync and backup with notifications, see `docker-compose` example(s):\n\n- [Cron-based sync with curl notifications](docs/examples/cron-sync)\n- [Cron-based sync with pingme notifications](docs/examples/cron-sync-pingme)\n- [Cron-based sync and backup (same container) with curl notifications](docs/examples/cron-sync-backup)\n- [Cron-based sync and backup (separate containers) with curl notifications](docs/examples/cron-sync-backup-separate)\n\n### Secrets\n\nInstead of typing secrets as plain text in `/mbsyncrc` config file for the `User` and `Pass` options of `IMAPStore` (or `IMAPAccount`), use `UserCmd` or `PassCmd` which accepts a [shell command](https://isync.sourceforge.io/mbsync.html). This helps to separate configuration from secrets.\n\nFor example, if secrets are bind mounted as files in `/run/secrets/user` and `/run/secrets/pass`, use the following:\n\n```sh\nUserCmd \"cat /run/secrets/user\"\nPassCmd \"cat /run/secrets/pass\"\n```\n\nIf secrets are in environment variables `IMAP_USER` and `IMAP_PASS`, use the following:\n\n```sh\nUserCmd \"echo $IMAP_USER\"\nPassCmd \"echo $IMAP_PASS\"\n```\n\n### Command line usage\n\nTo view command line usage:\n\n```sh\ndocker run --rm -it theohbrothers/docker-isync:latest --help\n```\n\n## Known issues\n\n- For Exchange servers or `outlook.com` IMAP servers, it might be necessary to use `PipelineDepth 1` in the config file to limit the number of simultaneous IMAP commands. See [here](https://sourceforge.net/p/isync/bugs/22/).\n\n## Development\n\nRequires Windows `powershell` or [`pwsh`](https://github.com/PowerShell/PowerShell).\n\n```powershell\n# Install Generate-DockerImageVariants module: https://github.com/theohbrothers/Generate-DockerImageVariants\nInstall-Module -Name Generate-DockerImageVariants -Repository PSGallery -Scope CurrentUser -Force -Verbose\n\n# Edit ./generate templates\n\n# Generate the variants\nGenerate-DockerImageVariants .\n```\n\n### Variant versions\n\n[versions.json](generate/definitions/versions.json) contains a list of [Semver](https://semver.org/) versions, one per line.\n\nTo update versions in `versions.json`:\n\n```powershell\n./Update-Versions.ps1\n```\n\nTo update versions in `versions.json`, and open a PR for each changed version, and merge successful PRs one after another (to prevent merge conflicts), and finally create a tagged release and close milestone:\n\n```powershell\n$env:GITHUB_TOKEN = 'xxx'\n./Update-Versions.ps1 -PR -AutoMergeQueue -AutoRelease\n```\n\nTo perform a dry run, use `-WhatIf`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheohbrothers%2Fdocker-isync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheohbrothers%2Fdocker-isync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheohbrothers%2Fdocker-isync/lists"}