# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 1.8.34
- **来源摘要:** SMTP client that can be used as an SMTP plugin for Mutt
- **主页:** <https://marlam.de/msmtp/>
- **最后更新:** 2026-07-31T21:29:57Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

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

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

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
## 其他软件包管理器记录

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


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