Skip to Main Content
Sendmail, 3rd Edition
book

Sendmail, 3rd Edition

by Bryan Costales
December 2002
Intermediate to advanced content levelIntermediate to advanced
1232 pages
56h 38m
English
O'Reilly Media, Inc.
Content preview from Sendmail, 3rd Edition

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/sendmail you<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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

sendmail, 4th Edition

sendmail, 4th Edition

Bryan Costales, Claus Assmann, George Jansen, Gregory Neil Shapiro
Postfix

Postfix

Richard Blum
Internet Forensics

Internet Forensics

Robert Jones

Publisher Resources

ISBN: 1565928393Errata Page