Mailx is an intelligent mail processing system in Linux with good features to send and receive emails. It is a character-based email agent, unlike Gmail, Outlook which is GUI-based. But this doesn’t undermine the importance of this utility.
This is based on Berkeley Mail 8.1 and provides the complete functionality of the POSIX mailx command. Extensions for MIME, IMAP, POP3, SMTP, and S/MIME are also available.
Features of mailx,
- Enhanced features for interactive use
- Caching and disconnected operation for IMAP
- Message threading
- Scoring, and filtering
Install Mailx on Linux
The mailx utility is available as bsd-mailx – simple mail user agent, mailutils – GNU mailutils utilities for handling mail on Ubuntu and other Debian-based distros while Heirloom mailx package for Redhat based system.
The mailx command may not be available on your Linux operating system by default, so you need to install it using the command given below.
Ubuntu, Linux Mint, and other Debian Linux users run the below command to install mailutils package,
sudo apt install mailutils
The below command to install bsd-mailx
sudo apt install bsd-mailx
- bsd-mailx has some limitations so better to use mailutils package.
- Heirloom package is not available for Ubuntu
Redhat/CentOS and Fedora Linux Distros run the below command to install mailx,
yum install mailx
Just type mailx on the command prompt to start the utility, if you get the Cannot open mailbox /var/mail/atechtown: Permission denied No mail for atechtown error as you are running this command for the first time and the user mailbox is not setup.