There are two tables of interest for handling the
sendmail
command line:
Table 15-1 shows the alternate names that
sendmail
will run under and the effect of each.
Table 15-2 shows the command-line switches used by
sendmail
and describes the effect of each.
The sendmail
program can exist in any
of several places, depending on the
version of the operating system you are running. Usually, it is
located in the /usr/sbin
directory and is called
sendmail
,[21] but it can also be located in the
/etc
, /usr/lib,
/usr/libexec, or /usr/etc
directories. The location of the sendmail
program can be found by examining the /etc/rc
files for BSD Unix or the /etc/init.d
files for
Sys V Unix (§1.6.11[3ed]).
Also, on some BSD-derived systems, the
mailwrapper
program and its
/etc/mail/mailer.conf
file define where
sendmail
is located.
In addition to the name sendmail, other names
(in other directories) can exist that alter the behavior of
sendmail. Those alternative names are usually
symbolic links to /usr/sbin/sendmail
. On some
systems, they can be hard links, and in rare cases, you might
actually find them to be copies. The complete list of other names is
shown in Table 15-1.
Table 15-1. Alternative names for sendmail
Name |
sendmail text reference |
Mode of operation |
---|---|---|
hoststat |
15.1.1[3ed] |
Print persistent host status (V8.8 and later) |
mailq |
15.1.2[3ed] |
Print the queue contents |
newaliases |
15.1.3[3ed] |
Rebuild the aliases file |
purgestat |
15.1.4[3ed] |
Purge persistent host status (V8.8 and later) |
smtpd |
15.1.5[3ed] |
Run in daemon mode |
Command-line switches are command-line
arguments
that
begin with a - character, and precede the list of recipients (if
any). The forms for command-line switches, where X
is a single letter, are:
-X
Boolean switch
-X
arg
switch with argument
All switches are single letters. The complete list is shown in Table 15-2.
Table 15-2. Command-line switches
Switch |
sendmail text reference |
Version |
Description |
---|---|---|---|
|
15.7.1[3ed] |
V8.12 and later |
Specify |
|
15.7.2[3ed] |
V8.1 and later |
Specify message body type |
|
15.7.3[3ed] |
All versions |
Set operating mode |
|
15.7.4[3ed] |
Not V8.1 through V8.6 |
Use ARPAnet/Grey Book protocols |
|
15.7.5[3ed] |
V8.8 and later |
Run as a daemon, but don’t fork |
|
15.7.6[3ed] |
All versions |
Run as a daemon |
|
15.7.7[3ed] |
V8.8 and later |
Purge persistent host status |
|
15.7.8[3ed] |
V8.8 and later |
Print persistent host status |
|
12.5.1[3ed] |
All versions |
Initialize alias database |
|
15.7.10[3ed] |
All versions |
Be a mail sender (the default) |
|
15.7.11[3ed] |
V8.12 and later |
Print number of messages in the queue |
|
11.6[3ed] |
All versions |
Print the queue |
|
15.7.13[3ed] |
All versions |
Run SMTP on standard input |
|
8.1[3ed] |
All versions |
Enter rule-testing mode |
|
15.7.15[3ed] |
All versions |
Verify: don’t collect or deliver |
|
15.7.16[3ed] |
Not V8 |
Freeze the configuration file |
|
15.7.17[3ed] |
All versions |
Location of the configuration file |
|
24.9.50[3ed] |
(deprecated) |
Set |
|
Section 16.1.1 [V8.13] |
V8.13 and later |
Redirect debugging to a file |
|
16.1[3ed] |
All versions |
Enter debugging mode |
|
15.7.20[3ed] |
Sony NEWS only |
Allow Japanese font conversion |
|
24.9.44[3ed] |
(deprecated) |
Set the |
|
15.7.22[3ed] |
All versions |
Set the sender’s full name |
|
15.7.23[3ed] |
All versions |
Set sender’s address |
|
15.7.24[3ed] |
V8.10 and later |
Set gateway submission mode |
|
15.7.25[3ed] |
(deprecated) |
Set the initial hop count |
|
15.7.26[3ed] |
(deprecated) |
This switch is a synonym for |
|
15.7.27[3ed] |
(deprecated) |
Set the |
|
15.7.28[3ed] |
Sony NEWS only |
Allow Japanese font conversion |
|
15.7.29[3ed] |
V8.10 and later |
Define a syslog(3) label |
|
21.2[3ed] |
V8.7 and later |
Define a |
|
24.9.69[3ed] |
Deprecated |
Set the |
|
15.7.32[3ed] |
V8.8 and later |
Specify DSN NOTIFY information |
|
12.6[3ed] |
All versions |
Don’t do aliasing |
|
24.2[3ed] |
V8.7 and later |
Set a multi-character option |
|
24.2[3ed] |
All versions |
Set a single character option |
|
15.7.36[3ed] |
V8.1 and later |
Set protocol and host |
|
11.8.1[3ed] |
All versions |
Process the queue |
|
Section 11.1.2.2 [V8.13] |
V8.13 and later |
Quarantine or unquarantine messages |
|
15.7.38[3ed] |
V8.8 and later |
Set what DSN info to return on a bounce |
|
15.7.23[3ed] |
(deprecated) |
This switch is a synonym for |
|
24.9.96[3ed] |
(deprecated) |
Set the |
|
24.9.87[3ed] |
(deprecated) |
Set the |
|
15.7.42[3ed] |
All versions |
Get recipients from message header |
|
15.7.43[3ed] |
V8.8 through V8.11 |
This is the initial MUA-to-MTA submission |
|
15.7.44[3ed] |
V8.8 and later |
Specify the ENVID string |
|
15.7.45[3ed] |
All versions |
Run in verbose mode |
|
14.2[3ed] |
V8.1 and later |
Log transactions |
|
15.7.47[3ed] |
OSF and AIX 3.x only |
This switch is ignored |
18.217.83.97