# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 1.4.18
- **来源摘要:** Microsoft MS-TNEF attachment unpacker
- **主页:** <https://github.com/verdammelt/tnef>
- **仓库:** <https://github.com/verdammelt/tnef>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- tnef (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.4.18
## 项目历史与用法

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

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

- 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
