page for the
“BUGS” section notes, “Usually,
which can be confusing.” So, note that this program may often have
different ways that it may be started.
-v parameter may turn on verbose mode.
- Using the command line
[#malfrcli]: Sending E-Mail from the
command line using the
The quotation marks above are likely to be used by the shell to make the multiple words “E-Mail subject” appear as just one parameter. The
-sparameter simply causes the next parameter to be used as an E-Mail subject. If the desired subject is just a single word, then the quotation marks are not necessary.
Note that specifying a subject on the command line is not required. One may use:
Running the program with a recipient specified, but without a subject, results in the program showing a line that says “
”. A line may then be typed and that line will then be used as a subject.
The previous example shows how to simply send mail. If there is a desire to see more details as the message gets sent, try:
Things to test, and which may get added to this section here:
- Typing a message in the program,
- (ending E-Mail with Ctrl-D / aborting with Ctrl-Cx2),
- piping (is Ctrl-D required then?),
- multiple recipients?
- [#malfrcli]: Sending E-Mail from the command line using the
- Using the program interactively
(This guide currently does not have details about sending E-Mail using this method.)
command may not have the easiest interface: using a full-screen program like Alpine may be easier for many users. However, one benefit of using this software is that it may be bundled with an operating system. Also, it may be somehow beneficial if someone uses a terminal that doesn't provide nice/working full-screen support. (However, if one is simply interested in reading mail, and is less concerned about other mail-related functions like marking the E-Mail message as a mesasge that has already been read, then using software designed to view files (particularly using an option that allows for searching through files) may be a sufficient alternative.
For users who are running
for the first time, it may be worthwhile to back up some files, such as all of /var/mail/ and, in case it already exists, the ~/mbox file. However, while that may be practical on a relatively brand new system with very little mail, it may be far less practical on a production system serving the mail of many users. Perhaps it will be practical to copy /var/mail/root and the /var/mail/username file that is named after the current user that is logged in.
command with no parameters is likely to check the terminal type and then use the
command's interactive mode. Specifying the
-Iparameter can help to force the interactive mode.
- Quitting, and what happens
q” may show results such as:
If that happens, then those messages (which were “unresolved”, according to the terminology used by the
program's internal help) are moved to an
mboxfile (which may be stored in the
Using the “
x” command might not do that?
uitting with changes saved, OpenBSD's manual page for the
command (specifically in the section describing the
-fparameter) notes, “
writes undeleted messages back to” the file being used. (If a mailbox has many messages, this could result in writing a lot of data just to effectively be deleting one E-Mail message.)
- Interactively looking at the right mailbox
To view the E-Mail of the currently logged in user, simply run:
To view the E-Mail of another user, such as the “root” account's mail, either provide permissions to read the file or, perhaps easier, obtain temporarily elevated permissions by running:
-u rootshown in the above example is the default. Therefore, it doesn't need to be specified. Other usernames could be specified, but if root's E-Mail is the E-Mail being read, then a slightly simpler command may be used:
Note that using the
command may cause root's mail to be read (by default).
This will provide the version of the
, as shown in the following example output:
8.1.2 01/15/2001. Type ? for help.
Then details of the current mailbox are shown. (This is the same output that will occur if running the
ficommand, with no parameters, from the
prompt that is within the
command.) For example, the text may look something like this:
Then, if the
command is not using the
-Nparameter to surpress showing E-Mail message summarized header lines, a list of messages will show. If there are more than 18 messages on a terminal with 24 lines, only information about the first 19 messages are shown.
The end user should be treated with a
prompt. Look towards the top where it shows the name of the mailbox in quotation marks (just before listing the number of messages). If that is set to a desirable value, then the desired mailbox is being viewed. If not, feel free to change it as needed. That can be done within the
program, by entering the following into the prompt:
That may show a message such as:
Then summarized header lines of the messages are then shown again. (Note that the term “headers” used in this sense is just showing basic details like the sender of the mail and the subject line of the E-Mail. It doesn't mean full E-Mail headers.)
There are a couple of other approaches that can be done so that the correct mailbox doesn't need to be specified within the program. One is to run:
or, perhaps the following will be easier to remember:
- Seeing how many E-Mail messages exist
This is shown at the start of the program, but it may be nice to review that again at a later time. This may be done by running the
ficommand with no paramaters.
- Viewing summarized header lines for all of the messages
If there are more than 18 messages on a terminal with 24 lines, only information about the first 19 messages are shown when the mailbox is first opened. To see twenty-one more messages, use:
Specifying more messages may cause some summarized header lines to scroll off the screen. Note that the last number needs to be an existent message number.
- Reading a message
There are various ways. Using “
t” will type the third message. Then “
n” will type the next message. Using “
p” will print the seventh message. Using “
more” will view the ninth message with the external
One message is considered to be the currently selected message. When the results of the
fcommand show the currently selected message, the first column of output will show a “greater-than” sign by whichever message is the currently selected message. Just running the
fcommand with no parameters will show just information about current message, so that is a way to determine what message is currently selected. Another command to read a message is the
ncommand which views the “next” message.
After a message is read, it may be considered to be “unresolved”.
There are a few ways to start writing a message:
- Starting a new message
Identify the message number(s) to reply to.
To reply to an existing E-Mail message, use:
If it is desired to reply to all recipients, use:
command will show a line that says “
Then, type a message. Press
to send. To abort sending the E-Mail, press