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

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

## 安装

```sh
sudo av install brew:tnef
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install tnef
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install tnef
```

  证据: MacPorts ports tree: textproc/tnef/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add tnef
```

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

- Debian apt (92%):

```sh
sudo apt install tnef
```

  证据: Debian stable package indexes: tnef from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install tnef
```

  证据: Fedora Rawhide package metadata: tnef 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#tnef
```

  证据: nixpkgs package indexes: pkgs/by-name/tn/tnef/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install tnef
```

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

## 软件包事实

- **软件包键:** brew:tnef
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/tnef>
- **版本:** 1.4.18
- **来源摘要:** Microsoft MS-TNEF attachment unpacker
- **主页:** <https://github.com/verdammelt/tnef>
- **仓库:** <https://github.com/verdammelt/tnef>
- **许可证:** GPL-2.0-or-later
- **源码归档:** <https://github.com/verdammelt/tnef/archive/refs/tags/1.4.18.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- tnef (cli)
- tnef (别名)

## 构建依赖

- autoconf
- automake
- libtool

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.4.18
- 本地数据: OK
- 上游仓库: https://github.com/verdammelt/tnef
- 检测到的最新版本: 1.4.18 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

TNEF is a small Unix command-line utility for unpacking Microsoft Transport Neutral Encapsulation Format attachments, commonly encountered as `application/ms-tnef` or `winmail.dat` files from Outlook and Exchange environments.

### 项目历史

The project history is unusually well preserved in its NEWS file. It began with a 0.6 first public release, reached 1.0 with MAPI attribute parsing and long filename support, and then accumulated the practical fixes expected of a mail-attachment unpacker: safer path handling, tar-like command options, automated tests, NetBSD and big-endian portability, Mac OS X configuration fixes, MIME type listing, RTF body saving, Unicode handling, and memory/security hardening.

Development reflects the long tail of interoperability with proprietary mail formats. The README explains the reason for the tool: Outlook and Exchange caused more mail to be wrapped in Microsoft's TNEF format, and this program let users extract attachments without needing Microsoft Outlook. Later NEWS entries show maintenance around Unicode filenames, multi-value MAPI attributes, allocator hardening, integer overflow checks, null pointer avoidance, and malicious input handling.

### 采用历史

TNEF became a classic packaging target because it solves a small but recurring system-administration problem. The supplied package facts list Homebrew, Debian, Ubuntu, Alpine, Fedora/DNF, MacPorts, Nix, and openSUSE/Zypper packaging, showing that it is carried broadly despite its narrow scope.

The README says it is mainly tested and used on GNU/Linux and Cygwin and should work on other Unix-like systems. That portability claim matches its package footprint: it is the kind of single-purpose C utility that distributions keep available so mail clients, scripts, and users can recover attachments from Microsoft-heavy environments.

### 使用方式

Users run `tnef` against a TNEF attachment to list or extract embedded files, message bodies, MIME types, or RTF data depending on options. Its normal role is not a daemon or workflow manager but a rescue utility for mail attachments that arrived in a Microsoft-only wrapper.

The project is especially useful in mixed Unix/Windows organizations, where a developer, sysadmin, or mail user may receive an attachment that is unreadable in a standard Unix mail client.

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

For package nerds, TNEF is a good example of a tiny utility that earns wide distribution packaging because it removes friction at an old interoperability boundary. It is not glamorous, but it turns a proprietary mail wrapper into ordinary files using normal Unix command-line patterns.

Its NEWS file is also a reminder that small parsers for hostile or malformed file formats need maintenance: many later releases are about bounds checks, overflows, Unicode edge cases, and safer extraction behavior.

### 时间线

- 0.6: First public release.
- 1.0: Added MAPI attribute parsing and long filename support.
- 2003: 1.2.2 added `--maxsize` for protection against hostile TNEF files.
- 2006: 1.3.3 added message body saving and Unicode handling.
- 2011: 1.4.8 switched to Git.
- 2017: 1.4.13 fixed security issues reported by external researchers.
- 2019: 1.4.18 improved strdup safety and corrected a bit-shift issue.

### Related projects

- Related to Unix mail clients and scripts that need to recover files from Outlook/Exchange `winmail.dat` attachments.
- Adjacent to other TNEF/MAPI parsers, but this package is the long-standing command-line unpacker distributed by Unix package managers.

### 来源

- <https://github.com/verdammelt/tnef#readme>
- <https://github.com/verdammelt/tnef/blob/master/ChangeLog>
- <https://github.com/verdammelt/tnef/blob/master/NEWS>
- input source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** tnef
- **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 - tnef - 1.4.18-4: normalized package name match | Debian stable package indexes: tnef from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Tool to unpack MIME application/ms-tnef attachments | https://github.com/verdammelt/tnef
- Nix - tnef: normalized package name match | nixpkgs package indexes: pkgs/by-name/tn/tnef/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - tnef - 1.4.18-3: normalized package name match | Ubuntu 24.04 LTS package indexes: tnef from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Tool to unpack MIME application/ms-tnef attachments | https://github.com/verdammelt/tnef
- apk - tnef - 1.4.18-r0: normalized package name match | Alpine Linux edge package indexes: tnef from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Program for unpacking ms-tnef MIME attachment | https://github.com/verdammelt/tnef
- apk - tnef-doc - 1.4.18-r0: normalized package name match | Alpine Linux edge package indexes: tnef-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Program for unpacking ms-tnef MIME attachment (documentation) | https://github.com/verdammelt/tnef
- dnf - tnef - 1.4.18-18.fc45: normalized package name match | Fedora Rawhide package metadata: tnef from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Extract files from email attachments like WINMAIL.DAT | https://github.com/verdammelt/tnef
- dnf - tnef-dolphin - 1.4.18-18.fc45: normalized package name match | Fedora Rawhide package metadata: tnef-dolphin from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Provides TNEF extract extension for KDE's Dolphin file manager | https://github.com/verdammelt/tnef
- dnf - tnef-nautilus - 1.4.18-18.fc45: normalized package name match | Fedora Rawhide package metadata: tnef-nautilus from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Provides TNEF extract extension for Gnome's Nautilus file manager | https://github.com/verdammelt/tnef
- zypper - tnef - 1.4.18-4.5: normalized package name match | openSUSE Tumbleweed package metadata: tnef from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Uncompress MS-TNEF Archives | https://github.com/verdammelt/tnef
- MacPorts - tnef: normalized package name match | MacPorts ports tree: textproc/tnef/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.
- [libtool](https://pkg.so/zh-hans/brew/libtool/) - Build dependency declared by Homebrew.
- [autoconf](https://pkg.so/zh-hans/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://pkg.so/zh-hans/brew/automake/) - Build dependency declared by Homebrew.
- [ripmime](https://pkg.so/zh-hans/brew/ripmime/) - Shares pkgdb curated category or tags: attachments, cli, email, productivity.
- [himalaya](https://pkg.so/zh-hans/brew/himalaya/) - Shares pkgdb curated category or tags: cli, email, productivity.
- [mutt](https://pkg.so/zh-hans/brew/mutt/) - Shares pkgdb curated category or tags: cli, email, productivity.
- [neomutt](https://pkg.so/zh-hans/brew/neomutt/) - Shares pkgdb curated category or tags: cli, email, productivity.
- [mu](https://pkg.so/zh-hans/brew/mu/) - Shares pkgdb curated category or tags: cli, email, productivity.
- [libpst](https://pkg.so/zh-hans/brew/libpst/) - Shares pkgdb curated category or tags: cli, email, outlook, productivity.
- [aerc](https://pkg.so/zh-hans/brew/aerc/) - Shares pkgdb curated category or tags: cli, email, productivity.
- [offlineimap](https://pkg.so/zh-hans/brew/offlineimap/) - Shares pkgdb curated category or tags: cli, email, productivity.
- [alot](https://pkg.so/zh-hans/brew/alot/) - Local package facts share a topical domain. Shared terms: cli, email, productivity.
- [gmailctl](https://pkg.so/zh-hans/brew/gmailctl/) - Local package facts share a topical domain. Shared terms: cli, email, productivity.
- [mairix](https://pkg.so/zh-hans/brew/mairix/) - Local package facts share a topical domain. Shared terms: cli, email, productivity.

## Combined YAML source

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


## 来源

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