Basic Modes of sendmail
Besides the daemon mode (discussed earlier), sendmail can be run in a number of other useful modes. In this section we’ll have a look at some of these. Others we’ll leave for later.
How to Run sendmail
One way to run sendmail is to provide it with
the name of a recipient as the only command-line argument. For
example, the following sends a mail message to
george:
% /usr/lib/sendmail georgeMultiple recipients can also be given. For example, the following
sends a mail message to george,
truman, and teddy:
% /usr/lib/sendmail george,truman,teddy
The sendmail
program accepts two different kinds of command-line arguments.
Arguments that do not begin with a
- character (such as george)
are assumed to be recipients. Arguments that do
begin with a - character are taken as switches
that determine the behavior of sendmail. The
recipients must always follow all the switched arguments. Any
switched arguments that follow recipients will be interpreted as
recipient addresses, potentially causing bounced mail.
In this chapter we will cover only a few of these switch-style command-line arguments (see Table 1-1). The complete list of command-line switches, along with an explanation of each, is presented in Chapter 15.
|
Flag |
Description |
|
-b |
Set operating mode |
|
-v |
Run in verbose mode |
|
-d |
Run in debugging mode |
Become a mode (-b)
The sendmail program can function in a number of
different ways depending on which form of -b argument you ...