Basic Parts of a Mail Message
In this section, we will examine the three parts that make up a mail message: the header, body, and envelope. But before we do, we must first demonstrate how to run sendmail by hand so that you can see what a message’s parts look like.
Run sendmail by Hand
Most users do not run sendmail directly. Instead, they use one of many MUAs to compose a mail message. Those programs invisibly pass the mail message to sendmail, creating the appearance of instantaneous transmission. The sendmail program then takes care of delivery in its own seemingly mysterious fashion.
Although most users don’t run sendmail directly, it is perfectly legal to do so. You, like many system managers, might need to do this to track down and solve mail problems.
Here’s a demonstration of one way to run sendmail by hand. First create a file named sendstuff with the following contents:
This is a one-line message.
Second, mail this file to yourself with the following command line,
where you is your login name:
%/usr/sbin/sendmailyou<sendstuff
Here, you run sendmail directly by specifying
its full pathname.[2] When you run
sendmail, any command-line arguments that do not
begin with a - character are considered to be the
names of the people to whom you are sending the mail message.
The <sendstuff sequence causes the contents of
the file that you have created (sendstuff) to be
redirected into the sendmail program. The
sendmail program treats everything it reads from its standard input (up ...