# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, zypper 安装 imapfilter

查看 imapfilter 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install imapfilter
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install imapfilter
```

  证据: 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
```

  证据: 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
```

  证据: 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
```

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

- Nix (92%):

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

  证据: 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
```

  证据: openSUSE Tumbleweed package metadata: imapfilter from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:imapfilter
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/imapfilter>
- **版本:** 2.8.5
- **来源摘要:** IMAP message processor/filter
- **主页:** <https://github.com/lefcha/imapfilter/>
- **仓库:** <https://github.com/lefcha/imapfilter>
- **上游文档:** <https://github.com/lefcha/imapfilter/>
- **许可证:** MIT
- **源码归档:** <https://github.com/lefcha/imapfilter/archive/refs/tags/v2.8.5.tar.gz>
- **最后更新:** 2026-06-25T13:37:45+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- imapfilter (cli)
- imapfilter (别名)

## 依赖

- lua
- openssl@3
- pcre2

## 安装行为

- post-install 钩子: 未定义
- 注意事项: You will need to create a ~/.imapfilter/config.lua file. Samples can be found in: $HOMEBREW_CELLAR/imapfilter/2.8.5/samples
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.8.5
- 管理器更新时间: 2026-06-25
- 本地数据: OK
- 上游仓库: https://github.com/lefcha/imapfilter
- 检测到的最新版本: v2.8.5 (当前)
## 项目历史与用法

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.

### 项目历史

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.

### 采用历史

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.

### 使用方式

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.

### 为什么软件包爱好者会关心

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.

### 时间线

- 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.

### 来源

- <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>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- 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:** 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

## 其他软件包管理器记录

- 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/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | A flexible client side mail filtering utility for IMAP servers | https://github.com/lefcha/imapfilter
- zypper - imapfilter - 2.8.5-1.4: normalized package name match | openSUSE Tumbleweed package metadata: imapfilter from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-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


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Productivity CLI packages](https://pkg.so/zh-hans/productivity-cli-packages/) - Matched curated productivity category metadata from av.db.
- [openssl@3](https://pkg.so/zh-hans/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [pcre2](https://pkg.so/zh-hans/brew/pcre2/) - Runtime dependency declared by Homebrew.
- [lua](https://pkg.so/zh-hans/brew/lua/) - Runtime dependency declared by Homebrew.
- [himalaya](https://pkg.so/zh-hans/brew/himalaya/) - Shares pkgdb curated category or tags: cli, imap, productivity.
- [neomutt](https://pkg.so/zh-hans/brew/neomutt/) - Shares pkgdb curated category or tags: cli, imap, productivity.
- [imapsync](https://pkg.so/zh-hans/brew/imapsync/) - Shares pkgdb curated category or tags: cli, imap, productivity.
- [aerc](https://pkg.so/zh-hans/brew/aerc/) - Shares pkgdb curated category or tags: cli, imap, productivity.
- [offlineimap](https://pkg.so/zh-hans/brew/offlineimap/) - Shares pkgdb curated category or tags: cli, imap, productivity.
- [claws-mail](https://pkg.so/zh-hans/brew/claws-mail/) - Shares pkgdb curated category or tags: cli, imap, productivity.
- [xplr](https://pkg.so/zh-hans/brew/xplr/) - Shares pkgdb curated category or tags: cli, lua, productivity.
- [imap-backup](https://pkg.so/zh-hans/brew/imap-backup/) - Shares pkgdb curated category or tags: cli, imap, productivity.
- [nmail](https://pkg.so/zh-hans/brew/nmail/) - Local package facts share a topical domain. Shared terms: cli, email, imap, openssl, openssl-3.
- [bkmr](https://pkg.so/zh-hans/brew/bkmr/) - Local package facts share a topical domain. Shared terms: cli, openssl, openssl-3, productivity.

## Combined YAML source

View the package source record on GitHub. [combined/imapfilter.yml](https://github.com/mxcl/pkgdb/blob/main/combined/imapfilter.yml)


## 来源

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