Useful Tables

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.

Alternative argv[0] Names

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

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

-A

15.7.1[3ed]

V8.12 and later

Specify sendmail.cf versus submit.cf

-B

15.7.2[3ed]

V8.1 and later

Specify message body type

-b

15.7.3[3ed]

All versions

Set operating mode

-ba

15.7.4[3ed]

Not V8.1 through V8.6

Use ARPAnet/Grey Book protocols

-bD

15.7.5[3ed]

V8.8 and later

Run as a daemon, but don’t fork

-bd

15.7.6[3ed]

All versions

Run as a daemon

-bH

15.7.7[3ed]

V8.8 and later

Purge persistent host status

-bh

15.7.8[3ed]

V8.8 and later

Print persistent host status

-bi

12.5.1[3ed]

All versions

Initialize alias database

-bm

15.7.10[3ed]

All versions

Be a mail sender (the default)

-bP

15.7.11[3ed]

V8.12 and later

Print number of messages in the queue

-bp

11.6[3ed]

All versions

Print the queue

-bs

15.7.13[3ed]

All versions

Run SMTP on standard input

-bt

8.1[3ed]

All versions

Enter rule-testing mode

-bv

15.7.15[3ed]

All versions

Verify: don’t collect or deliver

-bz

15.7.16[3ed]

Not V8

Freeze the configuration file

-C

15.7.17[3ed]

All versions

Location of the configuration file

-c

24.9.50[3ed]

(deprecated)

Set HoldExpensive option to true

-D

Section 16.1.1 [V8.13]

V8.13 and later

Redirect debugging to a file

-d

16.1[3ed]

All versions

Enter debugging mode

-E

15.7.20[3ed]

Sony NEWS only

Allow Japanese font conversion

-e

24.9.44[3ed]

(deprecated)

Set the ErrorMode option’s mode

-F

15.7.22[3ed]

All versions

Set the sender’s full name

-f

15.7.23[3ed]

All versions

Set sender’s address

-G

15.7.24[3ed]

V8.10 and later

Set gateway submission mode

-h

15.7.25[3ed]

(deprecated)

Set the initial hop count

-I

15.7.26[3ed]

(deprecated)

This switch is a synonym for -bi

-i

15.7.27[3ed]

(deprecated)

Set the IgnoreDots option to true

-J

15.7.28[3ed]

Sony NEWS only

Allow Japanese font conversion

-L

15.7.29[3ed]

V8.10 and later

Define a syslog(3) label

-M

21.2[3ed]

V8.7 and later

Define a sendmail macro on the command line

-m

24.9.69[3ed]

Deprecated

Set the MeToo option to true

-N

15.7.32[3ed]

V8.8 and later

Specify DSN NOTIFY information

-n

12.6[3ed]

All versions

Don’t do aliasing

-O

24.2[3ed]

V8.7 and later

Set a multi-character option

-o

24.2[3ed]

All versions

Set a single character option

-p

15.7.36[3ed]

V8.1 and later

Set protocol and host

-q

11.8.1[3ed]

All versions

Process the queue

-Q

Section 11.1.2.2 [V8.13]

V8.13 and later

Quarantine or unquarantine messages

-R

15.7.38[3ed]

V8.8 and later

Set what DSN info to return on a bounce

-r

15.7.23[3ed]

(deprecated)

This switch is a synonym for -f

-s

24.9.96[3ed]

(deprecated)

Set the SaveFromLine option to true

-T

24.9.87[3ed]

(deprecated)

Set the QueueTimeout option

-t

15.7.42[3ed]

All versions

Get recipients from message header

-U

15.7.43[3ed]

V8.8 through V8.11

This is the initial MUA-to-MTA submission

-V

15.7.44[3ed]

V8.8 and later

Specify the ENVID string

-v

15.7.45[3ed]

All versions

Run in verbose mode

-X

14.2[3ed]

V8.1 and later

Log transactions

-x

15.7.47[3ed]

OSF and AIX 3.x only

This switch is ignored



[21] On SunOS 4.x systems, you can find /usr/lib/sendmail.mx for use with the Domain Name System.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.83.97