{"id":20511028,"url":"https://github.com/sandipb/imapfilter-docker","last_synced_at":"2026-05-04T17:34:13.962Z","repository":{"id":44983166,"uuid":"513190958","full_name":"sandipb/imapfilter-docker","owner":"sandipb","description":"Docker image for running imapfilter to clean up your inbox.","archived":false,"fork":false,"pushed_at":"2022-07-13T12:22:21.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-02T16:04:47.834Z","etag":null,"topics":["docker","docker-image","email","imapfilter"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"eikendev/imapfilter-docker","license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandipb.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}},"created_at":"2022-07-12T15:13:41.000Z","updated_at":"2025-02-06T08:29:26.000Z","dependencies_parsed_at":"2022-07-13T03:20:37.679Z","dependency_job_id":null,"html_url":"https://github.com/sandipb/imapfilter-docker","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandipb%2Fimapfilter-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandipb%2Fimapfilter-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandipb%2Fimapfilter-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandipb%2Fimapfilter-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandipb","download_url":"https://codeload.github.com/sandipb/imapfilter-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242117654,"owners_count":20074433,"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","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":["docker","docker-image","email","imapfilter"],"created_at":"2024-11-15T20:32:31.570Z","updated_at":"2025-12-02T19:11:11.154Z","avatar_url":"https://github.com/sandipb.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\n[![Main](https://github.com/sandipb/imapfilter-docker/actions/workflows/main.yml/badge.svg)](https://github.com/sandipb/imapfilter-docker/actions/workflows/main.yml) [![Docker Pulls](https://img.shields.io/docker/pulls/sandipb/imapfilter.svg)](https://hub.docker.com/r/sandipb/imapfilter/)\n\nThis image runs [imapfilter](https://github.com/lefcha/imapfilter), a tool for email filtering. It serves similar\npurposes as [Sieve](http://sieve.info/), but no server-side support is required.\n\nNOTE: Originally based on a fork of \u003chttps://github.com/eikendev/imapfilter-docker\u003e\n\n## Running the image\n\nCreate a directory to put your `imapfilter` config in. Since the configuration might have passwords, you should apply\nappropriate permissions on it restricting it to a specific uid.\n\n```shell-session\n$ docker run  --rm --init  --user 1025:1025  --name=imapfilter \\\n              -v /etc/imapfilter:/config \\\n              -e IMAPFILTER_CONFIG=/config/config.lua \\\n              ghcr.io/sandipb/imapfilter\nRunning: /usr/bin/imapfilter -c /config/config.lua\n...\n```\n\nThe behavior of `imapfilter` can be customized by setting the following environment variables:\n\n- `IMAPFILTER_CONFIG_DIR`: If this is provided and `IMAPFILTER_CONFIG` is not provided, then `imapfilter` will look for\n  the config file `${IMAPFILTER_CONFIG_DIR}/.imapfilter/config.lua`. This will also set the environment variable\n  `IMAPFILTER_HOME` to this value.\n- `IMAPFILTER_CONFIG`: Path to the config file. Usually this is the minimum environment variable you need to set. Make\n  sure this path is readable by the userid the docker runs with (default `2000:2000`)\n- `IMAPFILTER_VERBOSE`: Adds `-v` parameter to `imapfilter` causing the imap protocol details to be dumped to stdout.\n- `IMAPFILTER_DEBUG_FILE`: Path to a file where debug information will be dumped. Adds the `-d DEBUGFILE` parameter to\n  `imapfilter` invocation.\n- `IMAPFILTER_DRY_RUN`: Run `imapfilter` in dry-run mode (parameter `-n`).\n- `IMAPFILTER_LOG_DIR`: Path to a directory where the `imapfilter` process will write its stdout and stderr output.\n  Specifically, in `${IMAPFILTER_LOG_DIR}/imapfilter-stdout.log` and `${IMAPFILTER_LOG_DIR}/imapfilter-errors.log`\n  respectively.\n  \n  **Note:** When using this feature, it is best to mount a [`tmpfs` filesystem](https://docs.docker.com/storage/tmpfs/) on `/tmp` by passing the parameter `--tmpfs /tmp` to `docker run`. This avoids reusing tmp space in the container across invocations and possible clash of temporary files.\n- `IMAPFILTER_EXTRA_ARGS`: Any extra parameters that you would like to add to the `imapfilter` invocation.\n\n## imapfilter resources\n\nThese are some resources I found useful for writing imapfilter rules:\n- imapfilter configuration man page: \u003chttps://linux.die.net/man/5/imapfilter_config\u003e\n- Official imapfilter sample recipes: \u003chttps://github.com/lefcha/imapfilter/tree/master/samples\u003e\n- \u003chttps://moiristo.wordpress.com/2008/11/18/sorting-imap-mail-with-imapfilter/\u003e\n- \u003chttps://www.npcglib.org/~stathis/blog/2012/07/09/linux-task-sorting-mail-with-imapfilter/\u003e\n- \u003chttps://raymii.org/s/blog/Filtering_IMAP_mail_with_imapfilter.html\u003e\n- \u003chttps://ineed.coffee/Old+Posts/Imapfilter+for+remote+rules+to+an+IMAP\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandipb%2Fimapfilter-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandipb%2Fimapfilter-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandipb%2Fimapfilter-docker/lists"}