How to install mailx on AlmaLinux, Rocky Linux & RHEL
Enhanced implementation of the mailx command
Availability
| Distro | aarch64 | noarch | x86_64 | Version |
|---|---|---|---|---|
| RHEL 10 | — | — | — | |
| RHEL 9 | — | — | ✓ | 12.5 |
| RHEL 8 | — | — | — | |
| RHEL 7 | — | — | — | |
| RHEL 6 | — | — | — |
Description
Mailx is an enhanced mail command, which provides the functionality of the POSIX mailx command, as well as SysV mail and Berkeley Mail (from which it is derived). Additionally to the POSIX features, mailx can work with Maildir/ e-mail storage format (as well as mailboxes), supports IMAP, POP3 and SMTP protocols (including over SSL) to operate with remote hosts, handles mime types and different charsets. There are a lot of other useful features, see mailx(1). And as its ancient analogues, mailx can be used as a mail script language, both for sending and receiving mail. Besides the "mailx" command, this package provides "mail" and "Mail" (which should be compatible with its predecessors from the mailx-8.x source), as well as "nail" (the initial name of this project).
Compatible with all RHEL-based distributions, including CentOS, AlmaLinux, Oracle Linux, Rocky Linux, etc.
Install
mailx on AlmaLinux / Rocky Linux / Oracle Linux / RHEL 9
sudo dnf -y install https://extras.getpagespeed.com/release-latest.rpm sudo dnf -y install mailx
Package downloads require an active GetPageSpeed subscription — one repository for mailx and 3,000+ more packages across every maintained Enterprise Linux release.
Subscribe — from $10/moFrequently asked questions
How do I install mailx on AlmaLinux, Rocky Linux or RHEL?
Add the GetPageSpeed repository, then run: sudo dnf -y install mailx (use yum on EL7). The same package works on AlmaLinux, Rocky Linux, Oracle Linux, CentOS Stream and RHEL.
Which Enterprise Linux versions is mailx available for?
mailx is available for RHEL 9 and the matching AlmaLinux, Rocky Linux and Oracle Linux releases.
Is mailx compatible with Rocky Linux, Oracle Linux and CentOS Stream?
Yes. The RPM is built for Enterprise Linux and is binary-compatible across all RHEL rebuilds of the same major version, including AlmaLinux, Rocky Linux, Oracle Linux and CentOS Stream.