Mailx is a command line utility for sending and receiving mail. While I use a graphical client to check external mail, mailx is useful for checking local system mail.
Mailx is an improved version of the mail utility and is intended to be a drop-in replacement for it. For this reason, on some systems mail is a link to mailx or vice versa.
Many systems have mailx already installed. Those that don’t invariably have it available in their distribution’s package manager, sometimes as part of a package bundle. Common package bundle names include heirloom-mailx (the one I choose if available), bsd-mailx, or mailutils.
Once installed, start mailx:
You will enter a mailx session, which works similar to a vi session. The initial view is of your inbox, with a > indicating the current message. The inbox is followed by a ? prompt. A few useful commands that can be given at the ? prompt are:
To start, send yourself a test message. You will be prompted for a subject, which should end with a return. Then enter your message. A single period followed by a return ends and sends the message.
Now display the inbox and insure your test message is there:
Display message number 5. The message can be scrolled, less-like:
Mark messages 1 through 4 for deletion:
Quit mailx, deleting messages marked for deletion:
ALTERNATIVES TO MAILX
If you just have to have a GUI tool, some mail clients can check local system mail. One is Evolution.