Like vi, mailx is a somewhat arcane mail reader. It comes standard with most (if not all) versions of unix. It has been around a long time, and therefore retains some of the features of a line-based mail reader.
Help for mailx is available at the mailx prompt > by typing
?. More information can be found by using the
Unix Help Utility at
http://www.uni.edu/unixhelp.
When editing a message in mailx, you will be using a line-mode editor. When
finished entering text, hold down the [Ctrl] key and press D.
To invoke mailx, simply type mailx at the $ prompt. If you
don't have any mail (read or unread) waiting, you will be returned to the $
prompt. If you do have mail, you will be shown a list of your mail messages.
If you don't have any mail (read or unread) in your mailbox, you can invoke
mailx with the recipients e-mail address by typing mailx [recipient].
| Desired Function | Command |
|---|---|
| Get help | ? |
| Get list of commands | list |
| Display active message headers | header |
| Display next page of headers | z |
| Display previous page of headers | - |
| Display next message | next |
| Display previous message | - |
| Send a message | mail
[recipient] |
| Reply to all recipients of a message | reply |
| Reply to send of a message | Reply |
| Delete messages | delete [list of
message numbers] |
| Undelete messages | undelete [list of message numbers] |
| Display top 5 lines of messages | top
[list of message numbers] |
| Exit mailx, save unread messages | quit |
| Exit mailx, save all messages | xit |
mailxqref