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

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

## 安装

```sh
sudo av install brew:msmtp
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install msmtp
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install msmtp
```

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

### Linux

- apk (92%):

```sh
sudo apk add msmtp
```

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

- Debian apt (92%):

```sh
sudo apt install msmtp
```

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

- dnf (92%):

```sh
sudo dnf install msmtp
```

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

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

- pacman (92%):

```sh
sudo pacman -S msmtp
```

  证据: Arch Linux sync databases: msmtp from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install msmtp
```

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

## 软件包事实

- **软件包键:** brew:msmtp
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/msmtp>
- **版本:** 1.8.34
- **来源摘要:** SMTP client that can be used as an SMTP plugin for Mutt
- **主页:** <https://marlam.de/msmtp/>
- **上游文档:** <https://marlam.de/msmtp/>
- **许可证:** GPL-3.0-or-later
- **源码归档:** <https://marlam.de/msmtp/releases/msmtp-1.8.34.tar.xz>
- **最后更新:** 2026-07-31T21:29:57Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- msmtp (cli)
- msmtpd (cli)
- msmtp (别名)
- msmtpd (别名)

## 依赖

- gettext
- gnutls
- libidn2

## 构建依赖

- pkgconf

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.8.34
- 管理器更新时间: 2026-07-31
- 本地数据: OK
- 上游仓库: https://marlam.de/msmtp/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

msmtp is Martin Lambers's lightweight SMTP client for Unix-like mail workflows. The AUTHORS file says msmtp was mostly written by Lambers and that much of its code is shared with mpop. Its manual describes the default mode: read a message from standard input and send it to a configured SMTP server, while keeping command-line options and exit codes compatible with sendmail.

### 项目历史

The project grew into a focused replacement for the sending side of a local mail transfer agent. Its configuration organizes SMTP servers as accounts with host, authentication, TLS, and related settings, and the manual documents TLS, multiple authentication mechanisms, delivery status notifications, PIPELINING, server-information mode, Remote Message Queue Starting, and the minimal SMTP server msmtpd.

### 使用方式

msmtp's adoption niche is the modular command-line mail stack. It is commonly paired with MUAs rather than acting as a full mail server: the Debian wiki names Mutt and Emacs as examples, and the manual includes examples for Mutt and traditional mail commands. Package managers often provide it as both the `msmtp` executable and a sendmail-compatible MTA alternative for scripts, cron jobs, and small systems that only need outbound SMTP relay.

### 来源

- <https://formulae.brew.sh/formula/msmtp>
- <https://github.com/marlam/msmtp/blob/master/AUTHORS>
- <https://marlam.de/msmtp/msmtp.html>
- <https://wiki.debian.org/msmtp>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal


## 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: SYSCONFDIR/msmtprc, ~/.msmtprc, $XDG_CONFIG_HOME/msmtp/config

## Credential files

- Unix: ~/.netrc, SYSCONFDIR/netrc
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** msmtp
- **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 - msmtp - 1.8.28-3: normalized package name match | Debian stable package indexes: msmtp from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | light SMTP client with support for server profiles | https://marlam.de/msmtp/
- Debian apt - msmtp-mta - 1.8.28-3: normalized package name match | Debian stable package indexes: msmtp-mta from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | light SMTP client with support for server profiles - the regular MTA | https://marlam.de/msmtp/
- Nix - msmtp: normalized package name match | nixpkgs package indexes: pkgs/by-name/ms/msmtp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - msmtp - 1.8.24-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: msmtp from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | light SMTP client with support for server profiles | https://marlam.de/msmtp/
- Ubuntu apt - msmtp-mta - 1.8.24-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: msmtp-mta from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | light SMTP client with support for server profiles - the regular MTA | https://marlam.de/msmtp/
- apk - msmtp - 1.8.33-r0: normalized package name match | Alpine Linux edge package indexes: msmtp from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | SMTP client with a sendmail compatible interface | https://marlam.de/msmtp/
- apk - msmtp-doc - 1.8.33-r0: normalized package name match | Alpine Linux edge package indexes: msmtp-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | SMTP client with a sendmail compatible interface (documentation) | https://marlam.de/msmtp/
- apk - msmtp-lang - 1.8.33-r0: normalized package name match | Alpine Linux edge package indexes: msmtp-lang from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Languages for package msmtp | https://marlam.de/msmtp/
- apk - msmtp-openrc - 1.8.33-r0: normalized package name match | Alpine Linux edge package indexes: msmtp-openrc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | SMTP client with a sendmail compatible interface (OpenRC init scripts) | https://marlam.de/msmtp/
- apk - msmtp-vim - 1.8.33-r0: normalized package name match | Alpine Linux edge package indexes: msmtp-vim from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Vim syntax for msmtp | https://marlam.de/msmtp/
- dnf - msmtp - 1.8.33-2.fc45: normalized package name match | Fedora Rawhide package metadata: msmtp from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | SMTP client | https://marlam.de/msmtp/
- pacman - msmtp - 1.8.34-1: normalized package name match | Arch Linux sync databases: msmtp from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A mini smtp client | https://marlam.de/msmtp/
- zypper - msmtp - 1.8.33-1.2: normalized package name match | openSUSE Tumbleweed package metadata: msmtp from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Lightweight SMTP Client | https://marlam.de/msmtp/
- zypper - msmtp-doc - 1.8.33-1.2: normalized package name match | openSUSE Tumbleweed package metadata: msmtp-doc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Documentation for msmtp | https://marlam.de/msmtp/
- zypper - msmtp-lang - 1.8.33-1.2: normalized package name match | openSUSE Tumbleweed package metadata: msmtp-lang from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Translations for package msmtp | https://marlam.de/msmtp/
- zypper - msmtp-mta - 1.8.33-1.2: normalized package name match | openSUSE Tumbleweed package metadata: msmtp-mta from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | MTA based on msmtp | https://marlam.de/msmtp/


## 相关链接

- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [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.
- [gettext](https://pkg.so/zh-hans/brew/gettext/) - Runtime dependency declared by Homebrew.
- [gnutls](https://pkg.so/zh-hans/brew/gnutls/) - Runtime dependency declared by Homebrew.
- [libidn2](https://pkg.so/zh-hans/brew/libidn2/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [sendemail](https://pkg.so/zh-hans/brew/sendemail/) - Shares pkgdb curated category or tags: cli, email, mail-client, networking, smtp.
- [mailutils](https://pkg.so/zh-hans/brew/mailutils/) - Shares pkgdb curated category or tags: cli, email, mail-client, networking.
- [fetchmail](https://pkg.so/zh-hans/brew/fetchmail/) - Shares pkgdb curated category or tags: cli, email, networking.
- [mpop](https://pkg.so/zh-hans/brew/mpop/) - Shares pkgdb curated category or tags: cli, email, networking.
- [goimapnotify](https://pkg.so/zh-hans/brew/goimapnotify/) - Shares pkgdb curated category or tags: cli, email, networking.
- [swaks](https://pkg.so/zh-hans/brew/swaks/) - Shares pkgdb curated category or tags: cli, email, networking, smtp.
- [exim](https://pkg.so/zh-hans/brew/exim/) - Shares pkgdb curated category or tags: cli, email, networking, smtp.
- [net-snmp](https://pkg.so/zh-hans/brew/net-snmp/) - Shares pkgdb curated category or tags: cli, daemon, networking.

## Combined YAML source

View the package source record on GitHub. [combined/msmtp.yml](https://github.com/mxcl/pkgdb/blob/main/combined/msmtp.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
