What is "mail", and how is it navigated?

The program lies in /usr/bin/mail. Upon implementation, Version 8.1.2 01/15/2001 is revealed.

Getting in list generates:

Commands are:
next, alias, print, type, Type, Print, visual, top, touch, preserve, 
delete, dp, dt, undelete, unset, mail, mbox, pipe, |, more, page, More, 
Page, unread, Unread, !, copy, chdir, cd, save, source, set, shell, 
version, group, write, from, file, folder, folders, ?, z, headers, 
help, =, Reply, Respond, reply, respond, edit, echo, quit, list, xit, 
exit, size, hold, if, else, endif, alternates, ignore, discard, retain, 
saveignore, savediscard, saveretain, core, #, inc, new

Entering ? generates:

Mail Command               Description
-------------------------  --------------------------------------------
t [message list]           type message(s).
n                          goto and type next message.
e [message list]           edit message(s).
f [message list]           give head lines of messages.
d [message list]           delete message(s).
s [message list] <file>    append message(s) to file.
u [message list]           undelete message(s).
R [message list]           reply to message sender(s).
r [message list]           reply to message sender(s) and all recipients.
p [message list]           print message list.
pre [message list]         make messages go back to /var/mail.
m <recipient list>         mail to specific recipient(s).
q                          quit, saving unresolved messages in mbox.
x                          quit, do not remove system mailbox.
h                          print out active message headers.
!                          shell escape.
| [msglist] command        pipe message(s) to shell command.
pi [msglist] command       pipe message(s) to shell command.
cd [directory]             chdir to directory or home if none given
fi <file>                  switch to file (%=system inbox, %user=user's
                           system inbox).  + searches in your folder
                           directory for the file.
set variable[=value]       set Mail variable.

Entering z reveals completion of the checklist of messages - yet that command is absent in the ? aid web page.

  1. What program is this?
  2. Exist tutorials for its usage?
  3. What are some usual commands and also handy methods for its usage?
  4. Just how can the message checklist be browsed (the reverse of z) or rejuvenated?

Explanation : This inquiry has to do with the interactive program and also not the manuscript - able command - i.e. the outcome of keying mail without flags or parameters right into an incurable.

2022-06-05 21:16:55
Source Share
Answers: 3

This page defines the interactive command carefully, and also remains in reality a rather detailed tutorial. Defines commands such as z and also z-:

If there is more than a screenful of messages, then z will
show the next screenful, and z- will show the previous screenful.
2022-06-05 23:38:03

mail isn't Pine ; it is simply mail. In an excellent globe, your variation of mail need to work with POSIX/SUS's (The most pertinent documents being under the "Extended Description" heading), yet, customarily, establishing the inconsistencies from excellence is left as a workout to the viewers.

2022-06-05 23:35:42

As its hand-operated states, mail is:

mail is a smart mail handling system which has a command syntax evocative ed (1) with lines changed by messages.

That is to claim, you can consider it as a fast means to execute some jobs connected to the mails you receive in the web server you are working with.

The power of mail can be recognized when creating shell manuscripts or cron work as an example.

To discover it much better, I've located some write-ups concerning mail command:

Another inquiry made on this website manages the very same concern:

2022-06-05 21:47:00