# Install imapfilter with Homebrew, apk, apt, dnf, MacPorts, Nix, zypper

IMAP message processor/filter. Version 2.8.5 via Homebrew; verified 2026-06-25.

## Install

```sh
sudo av install brew:imapfilter
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install imapfilter
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install imapfilter
```

  Evidence: MacPorts ports tree: mail/imapfilter/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add imapfilter
```

  Evidence: Alpine Linux edge package indexes: imapfilter from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install imapfilter
```

  Evidence: Debian stable package indexes: imapfilter from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install imapfilter
```

  Evidence: Fedora Rawhide package metadata: imapfilter from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#imapfilter
```

  Evidence: nixpkgs package indexes: pkgs/by-name/im/imapfilter/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install imapfilter
```

  Evidence: openSUSE Tumbleweed package metadata: imapfilter from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:imapfilter
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/imapfilter>
- **Version:** 2.8.5
- **Source summary:** IMAP message processor/filter
- **Homepage:** <https://github.com/lefcha/imapfilter/>
- **Repository:** <https://github.com/lefcha/imapfilter>
- **Upstream docs:** <https://github.com/lefcha/imapfilter#readme>
- **License:** MIT
- **Source archive:** <https://github.com/lefcha/imapfilter/archive/refs/tags/v2.8.5.tar.gz>
- **Last updated:** 2026-06-25T13:37:45+02:00
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- imapfilter (cli)
- imapfilter (alias)

## Dependencies

- lua
- openssl@3
- pcre2

## Install behavior

- Post-install hook: not defined
- Caveats: You will need to create a ~/.imapfilter/config.lua file. Samples can be found in: $HOMEBREW_CELLAR/imapfilter/2.8.5/samples
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.8.5
- Package-manager updated: 2026-06-25
- Local data: ok
- Upstream repository: https://github.com/lefcha/imapfilter
- Upstream latest detected: v2.8.5 (current)
## Project history and usage

IMAPFilter is a scriptable command-line IMAP mail processor. Its distinguishing package-manager shape is that the filtering policy is written in Lua, so a small Unix utility becomes a programmable mail-maintenance environment rather than a fixed-rule filter.

### Project history

IMAPFilter 1.0 was released on May 23, 2004. The project settled into the 2.x line in 2007, and its NEWS file shows steady maintenance around IMAP protocol behavior, mailbox handling, Lua compatibility, TLS/OpenSSL support, and recovery from network failures.

The README describes IMAPFilter as a utility that connects to remote IMAP servers, searches messages, and then deletes, copies, moves, flags, or otherwise processes messages across mailboxes and servers. It documents Lua as both the configuration language and extension language, with manual pages for the command and configuration format.

### Adoption history

The project became useful in the niche where users wanted server-side mail triage without running a full mail client or local mail store. Its continued Homebrew formula and release train through the 2.8 series show a long-lived CLI with modest but persistent packaging demand.

The NEWS timeline reflects adaptation to real mail-server drift: TLS 1.1 and 1.2 support in 2013, certificate validation improvements in 2014, XOAUTH2 support in 2015, OpenSSL 3 support in 2022, and UTF-8 IMAP support in 2023.

### How it is used

Users write Lua configuration under the documented IMAPFilter config path, then run the CLI to search remote mailboxes and apply actions. Because credentials can live in the same Lua config, the tool is often treated like a personal automation script with careful file permissions.

Typical package-nerd usage is cron-style mailbox hygiene: delete or move old mail, copy messages between accounts, flag matching messages, or use Lua extensions when ordinary IMAP search expressions are not expressive enough.

### Why package nerds care

IMAPFilter is a classic example of a small C/Unix utility made powerful by embedding a scripting language. For package people, it sits in the same mental drawer as fetchmail, procmail, and notmuch-adjacent mail tools: compact, automatable, and opinionated about text configuration.

Its history is also a reminder that email automation packages age by tracking servers, TLS stacks, authentication methods, and language runtimes. The interesting maintenance work is less feature splash and more staying compatible with IMAP providers and Lua/OpenSSL releases.

### Timeline

- 2004: IMAPFilter 1.0 is released.
- 2007: IMAPFilter 2.0 introduces the long-running 2.x series.
- 2012: IMAPFilter 2.5 adds session recovery and Lua 5.2 compatibility while making OpenSSL mandatory.
- 2015: IMAPFilter 2.6 adds Lua 5.3 compatibility and later XOAUTH2 support.
- 2020: IMAPFilter 2.7 adds Lua 5.4 and PCRE2 compatibility.
- 2023: IMAPFilter 2.8 adds a new recovery mechanism; 2.8.2 adds UTF-8 IMAP support.
- 2026: IMAPFilter 2.8.5 re-adds an OAuth2 example in the sample extension file.

### Related projects

- Lua is central to IMAPFilter's configuration and extension model.
- OpenSSL and PCRE2 are key build-time dependencies named by the project README.
- Other mail automation tools such as procmail, fetchmail, offlineimap, mbsync, and notmuch occupy adjacent packaging territory, though IMAPFilter focuses on remote IMAP mailbox processing.

### Sources

- <https://api.github.com/repos/lefcha/imapfilter>
- <https://formulae.brew.sh/api/formula/imapfilter.json>
- <https://github.com/lefcha/imapfilter>
- <https://raw.githubusercontent.com/lefcha/imapfilter/master/NEWS>
- <https://raw.githubusercontent.com/lefcha/imapfilter/master/README>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.imapfilter/config.lua

## Credential files

- Unix: ~/.imapfilter/config.lua
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** imapfilter
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - imapfilter - 1:2.8.2+1-0.2+b1: normalized package name match | Debian stable package indexes: imapfilter from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | filter mail in your IMAP account | https://github.com/lefcha/imapfilter
- Nix - imapfilter: normalized package name match | nixpkgs package indexes: pkgs/by-name/im/imapfilter/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - imapfilter - 1:2.8.2+1-0.2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: imapfilter from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | filter mail in your IMAP account | https://github.com/lefcha/imapfilter
- apk - imapfilter - 2.8.2-r0: normalized package name match | Alpine Linux edge package indexes: imapfilter from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Lua-based filtering for IMAP mailboxes | https://github.com/lefcha/imapfilter
- apk - imapfilter-doc - 2.8.2-r0: normalized package name match | Alpine Linux edge package indexes: imapfilter-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Lua-based filtering for IMAP mailboxes (documentation) | https://github.com/lefcha/imapfilter
- dnf - imapfilter - 2.8.3-5.fc45: normalized package name match | Fedora Rawhide package metadata: imapfilter from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A flexible client side mail filtering utility for IMAP servers | https://github.com/lefcha/imapfilter
- zypper - imapfilter - 2.8.5-1.2: normalized package name match | openSUSE Tumbleweed package metadata: imapfilter from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | A mail filtering utility | https://github.com/lefcha/imapfilter
- MacPorts - imapfilter: normalized package name match | MacPorts ports tree: mail/imapfilter/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Productivity CLI packages](https://www.automicvault.com/pkg/productivity-cli-packages/) - Matched curated productivity category metadata from av.db.
- [lua](https://www.automicvault.com/pkg/brew/lua/) - Runtime dependency declared by Homebrew.
- [openssl@3](https://www.automicvault.com/pkg/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [pcre2](https://www.automicvault.com/pkg/brew/pcre2/) - Runtime dependency declared by Homebrew.
- [himalaya](https://www.automicvault.com/pkg/brew/himalaya/) - Shares av.db curated category or tags: cli, email, imap, productivity.
- [imap-backup](https://www.automicvault.com/pkg/brew/imap-backup/) - Shares av.db curated category or tags: cli, email, imap, productivity.
- [imapsync](https://www.automicvault.com/pkg/brew/imapsync/) - Shares av.db curated category or tags: cli, email, imap, productivity.
- [mailcheck](https://www.automicvault.com/pkg/brew/mailcheck/) - Shares av.db curated category or tags: cli, email, imap, productivity.
- [meli](https://www.automicvault.com/pkg/brew/meli/) - Shares av.db curated category or tags: cli, email, imap, productivity.
- [neomutt](https://www.automicvault.com/pkg/brew/neomutt/) - Shares av.db curated category or tags: cli, email, imap, productivity.
- [neverest](https://www.automicvault.com/pkg/brew/neverest/) - Shares av.db curated category or tags: cli, email, imap, productivity.
- [nmail](https://www.automicvault.com/pkg/brew/nmail/) - Shares av.db curated category or tags: cli, email, imap, productivity.

## Combined YAML source

View the package source record on GitHub. [combined/imapfilter.yml](https://github.com/automic-vault/db/blob/main/combined/imapfilter.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
